Skip to content

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Dec 22, 2023

f91046e

Fix invalid CSS state web platform tests
https://bugs.webkit.org/show_bug.cgi?id=266822

Reviewed by Tim Nguyen.

Due to specificity of the :has() selector overriding the sibling
selector, the sibling selector test was never valid. Adding `[id]` to
the sibling selector bumps the specificity high enough to override the
`:has` style rule so that the sibling selector style rule can take
precedence, leading to a valid test.

Additionally, the `:has` style rule rendering the red colour meant that the
`:has` test was also always invalid. Changing the stylerule to use a
cyan (#0ff) helps differentiate the test. The actual test checked to see
if the colour was blue, which is obviously incorrect and this has now
  also been changed to assert that it should be the same teal as applied
  in the style rule.

* LayoutTests/imported/w3c/web-platform-tests/custom-state-pseudo-class/state-css-selector.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-state-pseudo-class/state-css-selector.tentative.html:

Canonical link: https://commits.webkit.org/272465@main

3d5c5ca

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@keithamus keithamus added the request-merge-queue Request a pull request to be added to merge-queue once ready label Dec 22, 2023
@nt1m nt1m added the merge-queue Applied to send a pull request to merge-queue label Dec 22, 2023
https://bugs.webkit.org/show_bug.cgi?id=266822

Reviewed by Tim Nguyen.

Due to specificity of the :has() selector overriding the sibling
selector, the sibling selector test was never valid. Adding `[id]` to
the sibling selector bumps the specificity high enough to override the
`:has` style rule so that the sibling selector style rule can take
precedence, leading to a valid test.

Additionally, the `:has` style rule rendering the red colour meant that the
`:has` test was also always invalid. Changing the stylerule to use a
cyan (#0ff) helps differentiate the test. The actual test checked to see
if the colour was blue, which is obviously incorrect and this has now
  also been changed to assert that it should be the same teal as applied
  in the style rule.

* LayoutTests/imported/w3c/web-platform-tests/custom-state-pseudo-class/state-css-selector.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-state-pseudo-class/state-css-selector.tentative.html:

Canonical link: https://commits.webkit.org/272465@main
@webkit-commit-queue webkit-commit-queue force-pushed the fix-invalid-css-state-web-platform-tests-https-bugs-webkit-org-show-bug-cgi-id-266822 branch from 3d5c5ca to f91046e Compare December 22, 2023 23:42
@webkit-commit-queue
Copy link
Collaborator

Committed 272465@main (f91046e): https://commits.webkit.org/272465@main

Reviewed commits have been landed. Closing PR #22208 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit f91046e into WebKit:main Dec 22, 2023
@webkit-commit-queue webkit-commit-queue removed merge-queue Applied to send a pull request to merge-queue request-merge-queue Request a pull request to be added to merge-queue once ready labels Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants