Skip to content

Make :active, :focus-within, and :hover account for top layer#61013

Open
annevk wants to merge 1 commit intoWebKit:mainfrom
annevk:eng/Make-active-focus-within-and-hover-account-for-top-layer
Open

Make :active, :focus-within, and :hover account for top layer#61013
annevk wants to merge 1 commit intoWebKit:mainfrom
annevk:eng/Make-active-focus-within-and-hover-account-for-top-layer

Conversation

@annevk
Copy link
Contributor

@annevk annevk commented Mar 20, 2026

436dbfa

Make :active, :focus-within, and :hover account for top layer
https://bugs.webkit.org/show_bug.cgi?id=310365

Reviewed by NOBODY (OOPS!).

This implements the requirement from

    https://drafts.csswg.org/selectors/#useraction-pseudos

> Specifically, if these match on a given element, they also match on
> the element’s flat tree ancestors, up to and including the first top
> layer element or the root element, whichever is encountered first.

Tests: imported/w3c/web-platform-tests/css/selectors/active-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/focus-within-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/hover-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/toplayer-transition-001.html

Upstream:

    web-platform-tests/wpt#58648

436dbfa

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests loading 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe loading 🛠 vision-apple
❌ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@annevk annevk requested review from cdumez and rniwa as code owners March 20, 2026 15:58
@annevk annevk self-assigned this Mar 20, 2026
@annevk annevk added the CSS Cascading Style Sheets implementation label Mar 20, 2026
@webkit-early-warning-system

This comment was marked as outdated.

@nt1m nt1m requested a review from anttijk March 20, 2026 16:02
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 20, 2026
@annevk annevk marked this pull request as draft March 20, 2026 17:06
https://bugs.webkit.org/show_bug.cgi?id=310365

Reviewed by NOBODY (OOPS!).

This implements the requirement from

    https://drafts.csswg.org/selectors/#useraction-pseudos

> Specifically, if these match on a given element, they also match on
> the element’s flat tree ancestors, up to and including the first top
> layer element or the root element, whichever is encountered first.

Tests: imported/w3c/web-platform-tests/css/selectors/active-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/focus-within-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/hover-toplayer-001.html
       imported/w3c/web-platform-tests/css/selectors/toplayer-transition-001.html

Upstream:

    web-platform-tests/wpt#58648
@annevk annevk removed the merging-blocked Applied to prevent a change from being merged label Mar 21, 2026
@annevk annevk force-pushed the eng/Make-active-focus-within-and-hover-account-for-top-layer branch from 85b8f9a to 436dbfa Compare March 21, 2026 07:30
@annevk annevk marked this pull request as ready for review March 21, 2026 07:41
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation merging-blocked Applied to prevent a change from being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants