[CSS Shadow Parts] Correct interaction with other pseudo elements
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Oct 2019 05:22:42 +0000 (05:22 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Oct 2019 05:22:42 +0000 (05:22 +0000)
commit42119c4e19ae76b72dd4a90ab375fc4348846559
tree0b88b2b1929ed7fbccb55379de55a28011cd6121
parent7f2891e1f7a4fa282059ef78147a7baf8348d0db
[CSS Shadow Parts] Correct interaction with other pseudo elements
https://bugs.webkit.org/show_bug.cgi?id=202526

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-shadow-parts/interaction-with-pseudo-elements-expected.txt:

Source/WebCore:

Cases like foo::part(bar)::before should work.

This patch doesn't cover ::placeholder which is implemented as PseudoElementWebKitCustom (like internal -webkit-* properties).

* css/CSSSelector.h:
(WebCore::isTreeStructuralPseudoClass):

Add a helper.

* css/parser/CSSSelectorParser.cpp:

Allow non-structural pseudo classes after ::part().
Allow other pseudo elements after ::part().

(WebCore::CSSSelectorParser::consumePseudo):

No need for DisallowPseudoElementsScope, we are just parsing identifiers.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-shadow-parts/interaction-with-pseudo-elements-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSSelector.h
Source/WebCore/css/parser/CSSSelectorParser.cpp