Changeset 285209 in webkit


Ignore:
Timestamp:
Nov 3, 2021 9:40:39 AM (9 months ago)
Author:
Antti Koivisto
Message:

::slotted shouldn't match an active <slot>
https://bugs.webkit.org/show_bug.cgi?id=232664

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scoping/slotted-slot-expected.txt:

Source/WebCore:

https://drafts.csswg.org/css-scoping/#slotted-pseudo

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

Avoid matching <slot>.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r285145 r285209  
     12021-11-03  Antti Koivisto  <antti@apple.com>
     2
     3        ::slotted shouldn't match an active <slot>
     4        https://bugs.webkit.org/show_bug.cgi?id=232664
     5
     6        Reviewed by Simon Fraser.
     7
     8        * web-platform-tests/css/css-scoping/slotted-slot-expected.txt:
     9
    1102021-11-01  Michael[tm] Smith  <mike@w3.org>
    211
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-slot-expected.txt

    r232903 r285209  
    11This text should be green.
    22
    3 FAIL Check that ::slotted does not match slot elements assert_equals: expected "rgb(0, 128, 0)" but got "rgb(255, 0, 0)"
     3PASS Check that ::slotted does not match slot elements
    44
  • trunk/Source/WebCore/ChangeLog

    r285205 r285209  
     12021-11-03  Antti Koivisto  <antti@apple.com>
     2
     3        ::slotted shouldn't match an active <slot>
     4        https://bugs.webkit.org/show_bug.cgi?id=232664
     5
     6        Reviewed by Simon Fraser.
     7
     8        https://drafts.csswg.org/css-scoping/#slotted-pseudo
     9
     10        * css/SelectorChecker.cpp:
     11        (WebCore::SelectorChecker::checkOne const):
     12
     13        Avoid matching <slot>.
     14
    1152021-11-03  Chris Lord  <clord@igalia.com>
    216
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r285202 r285209  
    11571157            if (!context.element->assignedSlot())
    11581158                return false;
     1159            // ::slotted matches after flattening so it can't match an active <slot>.
     1160            if (is<HTMLSlotElement>(*context.element) && context.element->containingShadowRoot())
     1161                return false;
    11591162            auto* subselector = context.selector->selectorList()->first();
    11601163            LocalContext subcontext(context);
Note: See TracChangeset for help on using the changeset viewer.