[wpt-sync] Sync PR 58656 - Implement user action pseudo-class propagation boundary for top layer
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 58656 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/58656
Details from upstream follow.
Mason Freed <masonf@chromium.org> wrote:
Implement user action pseudo-class propagation boundary for top layer
This CL updates the propagation behavior for user action pseudo-classes
(:hover,:active, and:focus-within) so they stop propagating up
the flat tree when they reach the first top-layer element in the
ancestor chain. This is to align with the spec [1][2].To support this, a new
UserActionElementTraversaltraversal utility is
introduced. It implementsTraversalParent\<FlatTreeTraversal>with the
specific condition of halting atnode.IsInTopLayer(). Existing
traversals inDocument::SetFocusedElementand
Element::SetHasFocusWithinUpToAncestorhave been updated to use this
new boundary logic. Logic was also removed for the special case of
customizable-\<select>, since this new general behavior is a superset.This is implemented behind an (experimental for now) runtime enabled
feature, UserActionPseudosStopAtTopLayer. I believe this will need
the full intent to ship, so I'll wait to flip the flag until I get
that going.[1] https://github.com/w3c/csswg-drafts/issues/11185#issuecomment-2769962819
[2] https://www.w3.org/TR/selectors-4/#useraction-pseudosBug: 407769114
Change-Id: I90adf9b5630344f4e520bb01a7a9a8be3ddce38e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7683005
Commit-Queue: Mason Freed \<masonf@chromium.org>
Reviewed-by: David Baron \<dbaron@chromium.org>
Auto-Submit: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1602913}
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 608 tests and 6 subtests
Status Summary
Firefox
OK : 1[GitHub] 256[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, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PASS : 17[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 5584[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 5911[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] 5912[Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt] 5913[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL : 3[GitHub] 82[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 88[Gecko-linux2404-64-debug, Gecko-linux2404-64-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, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PRECONDITION_FAILED: 1
Chrome
OK : 1
PASS : 1
FAIL : 3
Safari
OK : 1
PASS : 1
FAIL : 3
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /css/selectors/user-action-pseudo-top-layer.html [wpt.fyi]
- User action pseudo-classes on dialog (non-modal):
FAIL
- User action pseudo-classes on dialog (non-modal):
New Tests That Don't Pass
- /css/selectors/remove-hovered-element.html [wpt.fyi]:
PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-24h2-debug,Gecko-windows11-64-24h2-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] - /css/selectors/case-insensitive-parent.html [wpt.fyi]:
FAIL - /css/selectors/featureless-005.html [wpt.fyi]:
FAIL - /css/selectors/is-default-ns-003.html [wpt.fyi]:
FAIL - /css/selectors/is-where-visited.html [wpt.fyi]:
FAIL - /css/selectors/not-default-ns-003.html [wpt.fyi]:
FAIL - /css/selectors/i18n/lang-pseudo-class-across-shadow-boundaries.html [wpt.fyi]:
FAIL - /css/selectors/invalidation/lang-pseudo-class-in-has-multiple-document-elements.html [wpt.fyi]:
FAIL[Gecko-windows11-64-24h2-debug,Gecko-windows11-64-24h2-opt],PASS[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] - /css/selectors/focus-visible-007.html [wpt.fyi]
- Using keyboard while element is focused should trigger :focus-visible; using mouse without moving focus should not cancel it; moving focus using mouse should cancel it.:
FAIL
- Using keyboard while element is focused should trigger :focus-visible; using mouse without moving focus should not cancel it; moving focus using mouse should cancel it.:
- /css/selectors/focus-visible-011.html [wpt.fyi]
- :focus-visible matches even if preventDefault() is called:
FAIL
- :focus-visible matches even if preventDefault() is called:
- /css/selectors/is-where-shadow.html [wpt.fyi]
- :is() inside :host-context():
FAIL
- :is() inside :host-context():
- /css/selectors/open-pseudo.html [wpt.fyi]
- The select element should support :open.:
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-24h2-debug,Gecko-windows11-32-24h2-opt,Gecko-windows11-64-24h2-debug,Gecko-windows11-64-24h2-opt]
- The select element should support :open.:
- /css/selectors/user-action-pseudo-top-layer.html [wpt.fyi]
- User action pseudo-classes on dialog (modal):
FAIL(Chrome:FAIL, Safari:FAIL) - User action pseudo-classes on dialog (non-modal):
FAIL(Chrome:PASS, Safari:PASS) - User action pseudo-classes on popover (popover):
FAIL(Chrome:FAIL, Safari:FAIL) - User action pseudo-classes on customizable-select (open):
PRECONDITION_FAILED(Chrome:FAIL, Safari:FAIL)
- User action pseudo-classes on dialog (modal):
- /css/selectors/user-invalid.html [wpt.fyi]
- A required date should match :user-invalid if the user unchecks it and blurs.:
FAIL
- A required date should match :user-invalid if the user unchecks it and blurs.:
- /css/selectors/user-valid-user-invalid-multifield-inputs.tentative.html [wpt.fyi]
- <input type=date> keyboard behavior for :user-valid/:user-invalid.:
FAIL - <input type=time> keyboard behavior for :user-valid/:user-invalid.:
FAIL - <input type=datetime-local> keyboard behavior for :user-valid/:user-invalid.:
FAIL
- <input type=date> keyboard behavior for :user-valid/:user-invalid.:
- /css/selectors/user-valid.html [wpt.fyi]
- Date inputs should match :user-valid after the user types a value into it.:
FAIL
- Date inputs should match :user-valid after the user types a value into it.:
- /css/selectors/invalidation/heading-pseudo-class-in-has.html [wpt.fyi]
- Append h1 to #ancestor: #has_heading_1:
FAIL - Append h1 to #ancestor: #has_heading_1_2:
FAIL - Append h2 to #ancestor: #has_heading_1:
FAIL - Append h2 to #ancestor: #has_heading_2:
FAIL - Append h2 to #ancestor: #has_heading_1_2:
FAIL - Append h3 to #ancestor: #has_heading_1:
FAIL - Append h3 to #ancestor: #has_heading_2:
FAIL - Append h3 to #ancestor: #has_heading_3:
FAIL - Append h3 to #ancestor: #has_heading_1_2:
FAIL - Remove h1 from #ancestor: #has_heading_2:
FAIL - Remove h1 from #ancestor: #has_heading_3:
FAIL - Remove h1 from #ancestor: #has_heading_1_2:
FAIL - Remove h2 from #ancestor: #has_heading_3:
FAIL - Insert h1 adjacent to #sibling: #has_adjacent_heading_1:
FAIL - Insert h1 adjacent to #sibling: #adjacent_heading_1:
FAIL - Replace div with h1 in #ancestor: #has_heading_1:
FAIL - Replace div with h1 in #ancestor: #has_heading_1_2:
FAIL
- Append h1 to #ancestor: #has_heading_1:
- /css/selectors/invalidation/host-context-pseudo-class-in-has.html [wpt.fyi]
- After adding 'a' to #host_parent: Check #subject1 color:
FAIL - After adding 'a' to #host_parent: Check #subject2 color:
FAIL
- After adding 'a' to #host_parent: Check #subject1 color:
- /css/selectors/invalidation/host-has-shadow-tree-element-at-nonsubject-position.html [wpt.fyi]
- Add .descendant to #shadow_child:
FAIL - Add .descendant to #shadow_descendant:
FAIL - Add .ancestor to #shadow_child:has(.descendant):
FAIL - Remove .ancestor from #shadow_child:has(.descendant):
FAIL - Add .child to #shadow_child:has(.descendant):
FAIL - Remove .child from #shadow_child:has(.descendant):
FAIL - Add .child to #shadow_child:
FAIL - Add .grand_child to #shadow_descendant:
FAIL - Add .host_context to #host:
FAIL - Add .descendant to #shadow_descendant.grand_child:
FAIL - Remove .descendant from #shadow_descendant.grand_child:
FAIL - Remove .grand_child from #shadow_descendant:
FAIL - Insert #first_child.descendant to shadow root:
FAIL - Insert #last_child.descendant to shadow root:
FAIL - Insert #child_in_middle.descendant before #shadow_child:
FAIL - Insert #grand_child.descendant before #shadow_descendant:
FAIL
- Add .descendant to #shadow_child:
- /css/selectors/invalidation/host-has-shadow-tree-element-at-subject-position.html [wpt.fyi]
- Add .descendant to #shadow_child:
FAIL - Add .descendant to #shadow_descendant:
FAIL - Add .ancestor to #shadow_child:has(.descendant):
FAIL - Remove .ancestor from #shadow_child:has(.descendant):
FAIL - Add .child to #shadow_child:has(.descendant):
FAIL - Remove .child from #shadow_child:has(.descendant):
FAIL - Add .child to #shadow_child:
FAIL - Add .grand_child to #shadow_descendant:
FAIL - Add .host_context to #host:
FAIL - Add .descendant to #shadow_descendant.grand_child:
FAIL - Remove .descendant from #shadow_descendant.grand_child:
FAIL - Remove .grand_child from #shadow_descendant:
FAIL - Insert #first_child.descendant to shadow root:
FAIL - Insert #last_child.descendant to shadow root:
FAIL - Insert #child_in_middle.descendant before #shadow_child:
FAIL - Insert #grand_child.descendant before #shadow_descendant:
FAIL
- Add .descendant to #shadow_child:
- /css/selectors/invalidation/part-lang.html [wpt.fyi]
- ::part():lang() invalidation:
FAIL - ::part():lang() invalidation from setAttribute:
FAIL
- ::part():lang() invalidation:
- /css/selectors/parsing/parse-has-slotted.tentative.html [wpt.fyi]
- ":has-slotted(bar)" should be a valid selector:
FAIL - ":has-slotted([attr="foo"])" should be a valid selector:
FAIL - ":has-slotted(*)" should be a valid selector:
FAIL - ":has-slotted(.class)" should be a valid selector:
FAIL - ":has-slotted(#id)" should be a valid selector:
FAIL - ":has-slotted(:not(foo))" should be a valid selector:
FAIL - ":has-slotted(:not(:nth-last-of-type(2)):not([slot="foo"]))" should be a valid selector:
FAIL - ":has-slotted(:first-child)" should be a valid selector:
FAIL - ":has-slotted(:hover)" should be a valid selector:
FAIL - ":has-slotted(foo):first-child" should be a valid selector:
FAIL - ":has-slotted(foo):hover" should be a valid selector:
FAIL - ":has-slotted(foo):focus" should be a valid selector:
FAIL - ":has-slotted(foo):lang(en)" should be a valid selector:
FAIL - ":has-slotted(foo):dir(ltr)" should be a valid selector:
FAIL - ":has-slotted(foo) + :has-slotted(bar)" should be a valid selector:
FAIL - ":not(:has-slotted(foo))" should be a valid selector:
FAIL - ":has-slotted(div + div)" should be a valid selector:
FAIL - ":has-slotted(div:has(> span))" should be a valid selector:
FAIL
- ":has-slotted(bar)" should be a valid selector:
Tests Disabled in Gecko Infrastructure
- /css/selectors/remove-hovered-element.html [wpt.fyi]:
PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-24h2-debug,Gecko-windows11-64-24h2-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•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1613e394d09f
https://hg.mozilla.org/mozilla-central/rev/a3fe3f702e45
Comment 5•1 month ago
|
||
| bugherder | ||
Description
•