[wpt-sync] Sync PR 63469 - [wpt] sttf: don't assume text fragment scrolls within 2 frames
Categories
(Core :: DOM: Navigation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63469 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63469
Details from upstream follow.
Mike Taylor <miketaylr@chromium.org> wrote:
[wpt] sttf: don't assume text fragment scrolls within 2 frames
The scroll-to-text-fragment-security-replacestate target page reports
its scroll position two animation frames after load. Blink may
legitimately defer processing a cross-document text fragment until the
browser confirms the browsing context group state
(NotifyRelatedPagesFinalized, sent after DidCommit is processed) or
until the newly opened popup's page visibility and layout lifecycle
settle, and the spec allows UAs to delay the search. On a busy bot this
occasionally lands after the 2-rAF measurement, so the noopener 'sanity'
subtests flakily observe scrollY=0 and fail with 'Expected text fragment
directive to activate with noopener, but got scrollPosition=top'.Poll the scroll position across animation frames (requiring at least 10
frames and 500ms before reporting scrollY=0) instead of sampling at a
fixed 2-frame point. Positive cases report on the exact frame the scroll
lands; the 'must not activate' cases now wait at least 10 frames / 500ms
before reporting, which also makes them a stronger check. Remove the
Failure Pass expectation.Bug: 552768634
Change-Id: I3a0c9d6220352b7ef2c076c5e9e32a6ca0831625
Reviewed-on: https://chromium-review.googlesource.com/8542876
WPT-Export-Revision: 6ffe856fa7d9f2281958abfb39bc803efe1daeb5
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=103203
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 39 tests and 1 subtests
Status Summary
Firefox
OK : 1[GitHub] 37[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] 38[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]
PASS: 6[GitHub] 200[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] 201[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 202[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 1[GitHub] 3[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] 6[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]
Chrome
OK : 1
PASS: 7
Safari
OK : 1
PASS: 6
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /scroll-to-text-fragment/non-html-documents-json.html [wpt.fyi]:
OK[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],SKIP[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] - /scroll-to-text-fragment/find-range-from-text-directive.html?45-48 [wpt.fyi]
startelement contains hidden text which is not a block boundary.:FAIL
- /scroll-to-text-fragment/iframe-scroll.sub.html [wpt.fyi]
- SAME-ORIGIN: Text directive in iframe bubbles to outer frame.:
FAIL
- SAME-ORIGIN: Text directive in iframe bubbles to outer frame.:
- /scroll-to-text-fragment/non-html-documents.html [wpt.fyi]
- Text directive allowed in text/plain:
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],PASS[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]
- Text directive allowed in text/plain:
- /scroll-to-text-fragment/scroll-to-text-fragment-security-replacestate.sub.html [wpt.fyi]
- Sanity check: noopener with replaceState in head scrolls to text fragment:
FAIL(Chrome:PASS, Safari:FAIL)
- Sanity check: noopener with replaceState in head scrolls to text fragment:
- /scroll-to-text-fragment/scroll-to-text-fragment.html [wpt.fyi]
- Test navigation with fragment: Text directive should horizontally scroll into view.:
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],PASS[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] - Test navigation with fragment: Text directive should horizontally scroll into view within a wide line.:
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],PASS[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]
- Test navigation with fragment: Text directive should horizontally scroll into view.:
Tests Disabled in Gecko Infrastructure
- /scroll-to-text-fragment/non-html-documents-json.html [wpt.fyi]:
OK[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],SKIP[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]
Description
•