[wpt-sync] Sync PR 64472 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=308788
Categories
(Core :: Layout: Scrolling and Overflow, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64472 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64472
Details from upstream follow.
Simon Fraser <simon.fraser@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=308788
WebKit export from bug: [<!---->Scroll Anchoring]<!----> Reddit page becomes blank and jumps to top after clicking "<!---->View more comments"<!---->
<pre>
[Scroll Anchoring] Reddit page becomes blank and jumps to top after clicking "View more comments"On the reddit page, there's an intermediate state where the wrapper for the comments (
SHREDDIT-COMMENT-TREE)
has its content removed; its only child is a flexbox which has not been laid out yet, so we pick the wrapper
as the anchor. The wrapper happens to have large overflow into negative top and left, and this overflow
changes pre- to post-layout, so anchoring goes haywire.Fix by trimming negative overflow when computing the local anchor rect; we actually just use the anchor's
border box, extended in the block direction by layout overflow (since anchoring only affects scrolling on
the block progression axis).Added two new tests.
negative-layout-overflow-on-anchor.htmltests anchoring with changing negative
overflow on the anchor.anchor-used-height-change-does-not-suppress.htmlwas added to test another scenario
I investigated while coming up with the fix, which is an anchor whose used height changes; in all browsers
this does not suppress anchoring.This includes the lint fixes from <a href="https://commits.webkit.org/325383@main.">https://commits.webkit.org/325383@main.</a>
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=308788">https://bugs.webkit.org/show_bug.cgi?id=308788</a>
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=329678">https://bugs.webkit.org/show_bug.cgi?id=329678</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/308352@main">https://commits.webkit.org/308352@main</a>
</pre>
| Assignee | ||
Updated•24 days ago
|
| Assignee | ||
Updated•20 days ago
|
| Assignee | ||
Updated•20 days ago
|
| Assignee | ||
Comment 1•20 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=117107
| Assignee | ||
Comment 2•19 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 83 tests
Status Summary
Firefox
OK : 2[GitHub] 72[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 73[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 2[GitHub] 5[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 89[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 96[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 99[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 100[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 3[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
TIMEOUT: 1
ERROR : 1
Chrome
OK : 2
PASS : 2
Safari
OK : 2
PASS : 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-scroll-anchoring/focus-prioritized.html [wpt.fyi]
- Anchor selection prioritized focused element.:
FAIL
- Anchor selection prioritized focused element.:
- /css/css-scroll-anchoring/fragment-scrolling-anchors.html [wpt.fyi]
- Verify scroll anchoring interaction with fragment scrolls:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt],PASS[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- Verify scroll anchoring interaction with fragment scrolls:
- /css/css-scroll-anchoring/history-restore-anchors.html [wpt.fyi]
- Verify scroll anchoring interaction with history restoration:
FAIL
- Verify scroll anchoring interaction with history restoration:
- /css/css-scroll-anchoring/negative-layout-overflow.html [wpt.fyi]
- Anchor selection accounts for negative positioning.:
FAIL
- Anchor selection accounts for negative positioning.:
- /css/css-scroll-anchoring/reading-scroll-forces-anchoring.html [wpt.fyi]:
ERROR- Reading scroll position forces scroll anchoring adjustment.:
TIMEOUT
- Reading scroll position forces scroll anchoring adjustment.:
- /css/css-scroll-anchoring/start-edge-in-block-layout-direction.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview]
Tests Disabled in Gecko Infrastructure
- /css/css-scroll-anchoring/start-edge-in-block-layout-direction.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview]
Comment 4•16 days ago
|
||
| bugherder | ||
Comment 5•16 days ago
|
||
| bugherder | ||
Description
•