[webkit-changes] [WebKit/WebKit] f91046: Fix invalid CSS state web platform tests

Commit Queue noreply at github.com
Fri Dec 22 15:42:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f91046e9de3965769ec297b369d14afcfb644d61
      https://github.com/WebKit/WebKit/commit/f91046e9de3965769ec297b369d14afcfb644d61
  Author: Keith Cirkel <webkit at keithcirkel.co.uk>
  Date:   2023-12-22 (Fri, 22 Dec 2023)

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

  Log Message:
  -----------
  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




More information about the webkit-changes mailing list