tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit cee5e0928ca86fdba20bf60606caaf08cf667369
parent 241caedcaced700ff52f526ad987ddea5b539446
Author: Timothy Nikkel <tnikkel@gmail.com>
Date:   Mon,  1 Dec 2025 14:40:36 +0000

Bug 2003128. Add test for the simpler testcase of bug 1999954 (scroll plus anchor not redrawing). r=layout-reviewers,dshin

Differential Revision: https://phabricator.services.mozilla.com/D274479

Diffstat:
Alayout/reftests/scrolling/anchor-scroll-01.html | 25+++++++++++++++++++++++++
Alayout/reftests/scrolling/anchor-scroll-ref.html | 12++++++++++++
Mlayout/reftests/scrolling/reftest.list | 2++
3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/layout/reftests/scrolling/anchor-scroll-01.html b/layout/reftests/scrolling/anchor-scroll-01.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-no-flush reftest-wait" reftest-no-sync-layers> +<style> +body { + margin: 0; +} +</style> + +<div style="position: absolute; left: 0; top: 0;"> + <div id="scroller" style="position: absolute; overflow: auto; scrollbar-width: none; width: 100px; height: 100px;"> + <div style="width: 1px; height: 50px;"></div> + <div style="width: 50px; height: 50px; background: blue; anchor-name: --my-anchor;"></div> + <div style="width: 1px; height: 500px;"></div> + </div> + <div style="position: absolute; position-anchor: --my-anchor; width: 50px; height: 50px; background: yellow; left: anchor(right); top: anchor(bottom); position-visibility: always;"> +</div> + + +<script> +window.addEventListener("MozReftestInvalidate", async () => { + scroller.scrollTop = 5; + document.documentElement.classList.remove("reftest-wait"); +}); +</script> +</html> diff --git a/layout/reftests/scrolling/anchor-scroll-ref.html b/layout/reftests/scrolling/anchor-scroll-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<style> +body { + margin: 0; +} +</style> + +<div style="width: 50px; height: 50px; background: blue; position: absolute; top: 45px; left: 0px;"></div> +<div style="width: 50px; height: 50px; background: yellow; position: absolute; top: 95px; left: 50px;"></div> + +</html> diff --git a/layout/reftests/scrolling/reftest.list b/layout/reftests/scrolling/reftest.list @@ -142,3 +142,5 @@ pref(layout.disable-pixel-alignment,true) fuzzy-if(Android||cocoaWidget,255-255, fuzzy-if(Android,54-54,8-29) == xul-scrollbar-iterate.html xul-scrollbar-iterate-ref.html == scrollbars-area-in-iframe.html scrollbars-area-in-iframe-ref.html + +pref(image.testing.decode-sync.enabled,false) == anchor-scroll-01.html anchor-scroll-ref.html