[wpt-sync] Sync PR 62695 - Skip ignored subtrees when checking for block boundaries
Categories
(Core :: DOM: Navigation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62695 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62695
Details from upstream follow.
Rich Waters <rich@waters.io> wrote:
Skip ignored subtrees when checking for block boundaries
When collecting text between block boundaries for matching,
FindBuffer::IsInSameUninterruptedBlock is used to check for a boundary
by looking for a different inline formatting context in the nodes
between its two arguments. It skips ignored nodes, but it still descends
into their children.This patch skips over the children of an ignored node so that the
children's contents are also ignored. This fixes the matching across
broken images for text directives, because those broken images
have a shadow subtree for the alt text of an image even if that
alt text is empty or not specified. That subtree causes a block
boundary to be reported which causes CollectTextUntilBlockBoundary
to split up the buffer and prevent matching around it.This image behavior is only relevant when the MatchAcrossIgnoredNodes
find option is set, as otherwise a kNonCharacter is inserted in place
of the image and that prevents the matching.A new test in find-range-from-text-directive.html exercises the
new behavior. FindBufferTest is unsuitable, as it doesn't attempt
the image load that exposes the broken image and does not build
the extra shadow subtree.Guarded by runtime flag FindBufferSkipIgnoredSubtrees.
Fixed: 558819236
Change-Id: Iba173672752cfd3b7eaf5a4234072b6533bb9d36
Reviewed-on: https://chromium-review.googlesource.com/8374106
WPT-Export-Revision: 4de7c331af90c29526b3e13330d5bb854c5fff1e
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=91983
| Assignee | ||
Comment 2•2 months 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 : 13[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: 52[GitHub] 193[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] 194[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 195[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 : 13
PASS: 52
FAIL: 1
Safari
OK : 13
PASS: 49
FAIL: 4
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /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(Chrome:PASS, Safari: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-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/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
- 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]
Comment 4•2 months ago
|
||
| bugherder | ||
Comment 5•2 months ago
|
||
| bugherder | ||
Description
•