From c5404bee0ed2d1f4656add6ab241669eb8246c3d Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Fri, 25 Feb 2022 11:13:46 -0800 Subject: [PATCH] Improvements to the reftest analyzer. - Scroll the selected reference into view (makes it easier to tell which pdf you're looking at) - Show the keyboard shortcuts (easier for new people) - Keep the test/ref controls visible (if you scroll you can now tell if you're looking at a test or ref) --- test/resources/reftest-analyzer.css | 17 +++- test/resources/reftest-analyzer.html | 131 ++++++++++++++------------- test/resources/reftest-analyzer.js | 1 + 3 files changed, 83 insertions(+), 66 deletions(-) diff --git a/test/resources/reftest-analyzer.css b/test/resources/reftest-analyzer.css index 925e7346d..311e3a137 100644 --- a/test/resources/reftest-analyzer.css +++ b/test/resources/reftest-analyzer.css @@ -75,8 +75,7 @@ a { width: 320px; } -#images { - overflow: auto; +#imagepane { position: fixed; left: 340px; right: 0; @@ -84,6 +83,15 @@ a { bottom: 0; } +#images { + position: absolute; + left: 0; + right: 0; + top: 22px; + bottom: 0; + overflow: auto; +} + #imgcontrols { margin: 0; display: block; @@ -179,3 +187,8 @@ a { #differences { margin: 0 0 10px 20px; } + +#shortcuts { + float: right; + font-size: 10px; +} diff --git a/test/resources/reftest-analyzer.html b/test/resources/reftest-analyzer.html index 249c2eb40..00f9eaa0d 100644 --- a/test/resources/reftest-analyzer.html +++ b/test/resources/reftest-analyzer.html @@ -92,7 +92,7 @@ Original author: L. David Baron
-
+
diff --git a/test/resources/reftest-analyzer.js b/test/resources/reftest-analyzer.js index 913f2331e..fbc54a459 100644 --- a/test/resources/reftest-analyzer.js +++ b/test/resources/reftest-analyzer.js @@ -336,6 +336,7 @@ window.onload = function () { } gSelected = i; ID("url" + gSelected).classList.add("selected"); + ID("url" + gSelected).scrollIntoView(); const item = gTestItems[i]; const cell = ID("images");