Closed Bug 2089439 Opened 24 days ago Closed

[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)

task

Tracking

()

RESOLVED FIXED
162 Branch
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.html tests anchoring with changing negative
overflow on the anchor. anchor-used-height-change-does-not-suppress.html was 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>

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

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

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]
Status: NEW → RESOLVED
Closed: 16 days ago
Closed: 16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.