Hugh McMaster : winetest/gather: Dynamically set the scroll-margin-top property on the platform-specific index pages.

Alexandre Julliard julliard at winehq.org
Tue May 4 16:23:26 CDT 2021


Module: tools
Branch: master
Commit: d68796a68adfc4b980c51aacc836b53947f7d3e4
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=d68796a68adfc4b980c51aacc836b53947f7d3e4

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon May  3 23:31:41 2021 +1000

winetest/gather: Dynamically set the scroll-margin-top property on the platform-specific index pages.

The sticky <th> header row often has a different height depending on the
platform page being accessed. This prevents us from hard-coding the
scroll-margin-top property using CSS alone. Dynamically setting this value
ensures each bookmark is shown as expected.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/gather | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/winetest/gather b/winetest/gather
index 4698ac3..b4b9464 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -911,6 +911,12 @@ EOF
 To run the tests on your Windows machine, download the <a href="/builds/winetest-$short_build.exe">32-bit winetest</a>.
 If you have a 64-bit Windows OS, you can also run the <a href="/builds/winetest64-$short_build.exe">64-bit winetest</a>.
 </div>
+<script>
+  var sticky_height = document.querySelector('.sticky').offsetHeight + 1;
+  var style = document.createElement('style');
+  style.innerHTML = 'div.group table.report td.test a { scroll-margin-top: ' + sticky_height + 'px; }';
+  document.head.appendChild(style);
+</script>
 </body>
 </html>
 EOF




More information about the wine-cvs mailing list