tor-browser

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

commit e1140b43b14e9d0da34be7f4207ba9e8440fac15
parent f32d783634fbff2bfb28e319035b96a3a67411af
Author: Vladimir Levin <vmpstr@chromium.org>
Date:   Wed, 15 Oct 2025 08:23:42 +0000

Bug 1992824 [wpt PR 55256] - Anchor: Update anchor-scroll-position-try-011.html to scroll more., a=testonly

Automatic update from web-platform-tests
Anchor: Update anchor-scroll-position-try-011.html to scroll more.

This patch updates anchor-scroll-position-try-011.html to use
scrollWidth and scrollHeight for scrolling to force different fallback
selection. Previously, we would prefer to use last remembered offsets
which wouldn't change things until we intersect the containing block.

R=ikilpatrick@chromium.org

Bug: 438515315
Change-Id: I63626c8dbaa68065840a4c2994e2e046c3612acb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7012327
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1525759}

--

wpt-commits: 5dabda7dba04551427592363dcb79d6db7c90e37
wpt-pr: 55256

Diffstat:
Mtesting/web-platform/tests/css/css-anchor-position/anchor-scroll-position-try-011.html | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-position-try-011.html b/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-position-try-011.html @@ -49,6 +49,7 @@ position-try-fallbacks: --pf1, --pf2, --pf3; bottom: anchor(top); left: anchor(right); + position-visibility: always; } @position-try --pf1 { @@ -85,9 +86,12 @@ promise_test(async () => { assert_fallback_position(anchored, anchor, 'left'); }, 'Should use the last fallback position initially'); +const sw = scroller.scrollWidth; +const sh = scroller.scrollHeight; + promise_test(async () => { // Scroll up to have enough space above the anchor, but not enough right. - scroller.scrollTop = -250; + scroller.scrollTop = -sh; scroller.scrollLeft = 150; await waitUntilNextAnimationFrame(); assert_fallback_position(anchored, anchor, 'top'); @@ -97,7 +101,7 @@ promise_test(async () => { promise_test(async () => { // Scroll right to have enough space right to the anchor, but not enough above. scroller.scrollTop = -150; - scroller.scrollLeft = 250; + scroller.scrollLeft = sw; await waitUntilNextAnimationFrame(); assert_fallback_position(anchored, anchor, 'bottom'); assert_fallback_position(anchored, anchor, 'right'); @@ -105,8 +109,8 @@ promise_test(async () => { promise_test(async () => { // Scroll up and right to have enough space on both axes. - scroller.scrollTop = -350; - scroller.scrollLeft = 250; + scroller.scrollTop = -sh; + scroller.scrollLeft = sw; await waitUntilNextAnimationFrame(); assert_fallback_position(anchored, anchor, 'top'); assert_fallback_position(anchored, anchor, 'right');