IE9 fixes: mouse, doctype. Adobe Flash link.
Fix mouse button mapping in IE9. All browsers have converged on a standard left=0, middle=1, right=2 ... all except IE that is. Add html5 doctype to tests. In vnc_perf test, use do_test instead of start for function name since start is a keyword in IE. In error about Flash give a link to Adobe's download page.
This commit is contained in:
parent
0b6292b8c0
commit
f899070482
|
@ -221,8 +221,17 @@ function onMouseButton(e, down) {
|
||||||
}
|
}
|
||||||
evt = (e ? e : window.event);
|
evt = (e ? e : window.event);
|
||||||
pos = Util.getEventPosition(e, conf.target, conf.scale);
|
pos = Util.getEventPosition(e, conf.target, conf.scale);
|
||||||
|
if (evt.which) {
|
||||||
|
/* everything except IE */
|
||||||
bmask = 1 << evt.button;
|
bmask = 1 << evt.button;
|
||||||
//Util.Debug('mouse ' + pos.x + "," + pos.y + " down: " + down + " bmask: " + bmask);
|
} else {
|
||||||
|
/* IE including 9 */
|
||||||
|
bmask = (evt.button & 0x1) + // Left
|
||||||
|
(evt.button & 0x2) * 2 + // Right
|
||||||
|
(evt.button & 0x4) / 2; // Middle
|
||||||
|
}
|
||||||
|
//Util.Debug("mouse " + pos.x + "," + pos.y + " down: " + down +
|
||||||
|
// " bmask: " + bmask + "(evt.button: " + evt.button + ")");
|
||||||
if (c_mouseButton) {
|
if (c_mouseButton) {
|
||||||
c_mouseButton(pos.x, pos.y, down, bmask);
|
c_mouseButton(pos.x, pos.y, down, bmask);
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ function constructor() {
|
||||||
Util.Flash.version);
|
Util.Flash.version);
|
||||||
if ((! Util.Flash) ||
|
if ((! Util.Flash) ||
|
||||||
(Util.Flash.version < 9)) {
|
(Util.Flash.version < 9)) {
|
||||||
updateState('fatal', "WebSockets or Adobe Flash is required");
|
updateState('fatal', "WebSockets or <a href='http://get.adobe.com/flashplayer'>Adobe Flash<\/a> is required");
|
||||||
} else if (document.location.href.substr(0, 7) === "file://") {
|
} else if (document.location.href.substr(0, 7) === "file://") {
|
||||||
updateState('fatal',
|
updateState('fatal',
|
||||||
"'file://' URL is incompatible with Adobe Flash");
|
"'file://' URL is incompatible with Adobe Flash");
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Canvas Performance Test</title>
|
<title>Canvas Performance Test</title>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head><title>Input Test</title></head>
|
<head><title>Input Test</title></head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head><title>Input Test</title></head>
|
<head><title>Input Test</title></head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>VNC Performance Benchmark</title>
|
<title>VNC Performance Benchmark</title>
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
Passes: <input id='passes' style='width:50' value=3>
|
Passes: <input id='passes' style='width:50' value=3>
|
||||||
|
|
||||||
<input id='startButton' type='button' value='Start' style='width:100px'
|
<input id='startButton' type='button' value='Start' style='width:100px'
|
||||||
onclick="start();" disabled>
|
onclick="do_test();" disabled>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function start() {
|
function do_test() {
|
||||||
$D('startButton').value = "Running";
|
$D('startButton').value = "Running";
|
||||||
$D('startButton').disabled = true;
|
$D('startButton').disabled = true;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>VNC Playback</title>
|
<title>VNC Playback</title>
|
||||||
|
|
Loading…
Reference in New Issue