[CSS Shadow Parts] Fix style invalidation with class selector and ::before and :...
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Oct 2019 21:40:25 +0000 (21:40 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Oct 2019 21:40:25 +0000 (21:40 +0000)
commit60571ec42e3c054c2f08b6af071b884dc187bf63
tree826158a09b76c512616c55c1d94ad8d0f1be1c7c
parent7725edaaf3dbc5e7b5b6d1bf1a5f21f033ea5e4a
[CSS Shadow Parts] Fix style invalidation with class selector and ::before and ::after
https://bugs.webkit.org/show_bug.cgi?id=202694

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/css/shadow-parts/invalidation-class-before-after.html

* style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::invalidateStyleWithMatchElement):

Invalidate in the shadow tree if the computed match element is host.

(WebCore::Style::Invalidator::invalidateInShadowTreeIfNeeded):

Factor into a function.

* style/StyleInvalidator.h:

LayoutTests:

* fast/css/shadow-parts/invalidation-class-before-after-expected.txt: Added.
* fast/css/shadow-parts/invalidation-class-before-after.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/shadow-parts/invalidation-class-before-after-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/shadow-parts/invalidation-class-before-after.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/style/StyleInvalidator.cpp
Source/WebCore/style/StyleInvalidator.h