Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.

Commit 80e0a07

Browse files
committed
Fixes for IE 11 on Windows 8.1. Improved error messages for DPI scaling and browser zoom problems.
1 parent c2f55e6 commit 80e0a07

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

html/draw-pattern.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ var canvasGL = document.createElement('canvas');
3737
setPrefixed('position', 'absolute', canvasGL.style);
3838
setPrefixed('top', '0px', canvasGL.style);
3939
setPrefixed('left', '0px', canvasGL.style);
40-
setPrefixed('zIndex', '1', canvasGL.style); // IE 11 doesn't display this element without this hack.
4140
canvasGL.width = 500;
4241
canvasGL.height = 1;
4342
var gl = null;
@@ -86,7 +85,6 @@ rightBlocker.style.top = '0px';
8685
rightBlocker.style.background = 'black';
8786
rightBlocker.style.width = '100%';
8887
rightBlocker.style.height = '100%';
89-
rightBlocker.style.zIndex = '1'; // IE 11 doesn't draw this element without this hack.
9088
bottomBlocker.style.position = 'absolute';
9189
bottomBlocker.style.left = '0px';
9290
bottomBlocker.style.top = '1px';

html/latency-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ var runNextTest = function(previousTest) {
530530
var test = tests[testIndex];
531531
test.infoCell.textContent = '';
532532
test.resultCell.textContent = '⋯';
533-
setTimeout(function() { checkTimeout(test); }, 50000);
533+
setTimeout(function() { checkTimeout(test); }, 80000);
534534
if (test.test) {
535535
setTimeout(function() {
536536
try {

src/latency-benchmark.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static void init_statistic(char *name, statistic *stat, int value,
308308
}
309309

310310

311-
static const int64_t test_timeout_ms = 40000;
311+
static const int64_t test_timeout_ms = 80000;
312312
static const int64_t event_response_timeout_ms = 4000;
313313
static const int latency_measurements_to_take = 50;
314314

@@ -336,7 +336,7 @@ bool measure_latency(
336336
bool found_pattern = find_pattern(magic_pattern, screenshot, &x, &y);
337337
free_screenshot(screenshot);
338338
if (!found_pattern) {
339-
*error = "Failed to find test pattern on screen.";
339+
*error = "Failed to find test pattern on screen. Ensure that your browser's zoom level is set to \"100%\", and the top-left corner of the window is visible. If you have multiple displays, try moving the browser window to the main display.";
340340
return false;
341341
}
342342
uint8_t full_pattern[pattern_bytes];
@@ -456,6 +456,7 @@ bool measure_latency(
456456
return false;
457457
}
458458
if (scroll_updated) {
459+
debug_log("scroll measurements: %d", scroll_stats.measurements);
459460
// We saw the start of a scroll. Wait for the scroll animation to
460461
// finish before continuing. We assume the animation is finished if
461462
// it's been 100 milliseconds since we last saw the scroll position

src/win/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
182182
HDC desktop = GetDC(NULL);
183183
assert(desktop);
184184
if (GetDeviceCaps(desktop, LOGPIXELSX) != 96) {
185-
MessageBox(NULL, "Warning: The test will fail in non-DPI-aware browsers. To fix this, use Control Panel to set your DPI scaling factor to \"100%\" or \"Smaller\".",
186-
"Warning", MB_ICONWARNING | MB_OK);
185+
MessageBox(NULL, "Unfortunately, due to browser bugs you must set the Windows DPI scaling factor to \"100%\" or \"Smaller\" (96 DPI) for this test to work. Please change it and reboot.",
186+
"Unsupported DPI", MB_ICONERROR | MB_OK);
187+
WinExec("DpiScaling.exe", SW_NORMAL);
188+
return 1;
187189
}
188190
ReleaseDC(NULL, desktop);
189191
run_server();

0 commit comments

Comments
 (0)