haikuwebkit/LayoutTests/fast/shadow-dom/resources
Antti Koivisto 5b2b09dcfd REGRESSION (maybe r276882): custom properties not available on host on initial paint
https://bugs.webkit.org/show_bug.cgi?id=226574
<rdar://problem/78863643>

Reviewed by Simon Fraser.

Source/WebCore:

We fail to invalidate :host style when switching out of shared resolver after asynchronously
loading a stylesheet into a shadow tree. This happens because the resolver has been cleared and
the invalidation code just bails out if none is present.

Test case by vb@bigdot.de.

Test: fast/shadow-dom/shared-resolver-host-invalidation.html

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

Change the assumption so that if we don't have a resolver we always invalidate the host.
The alternative would be to build the resolver and do this accurately but doing that here
seems bit risky. This should be cheap and rare invalidation in any case.

LayoutTests:

* fast/shadow-dom/resources/shared-resolver-host-invalidation.css: Added.
(:host,):
(div):
* fast/shadow-dom/shared-resolver-host-invalidation-expected.html: Added.
* fast/shadow-dom/shared-resolver-host-invalidation.html: Added.


Canonical link: https://commits.webkit.org/238496@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-04 18:52:23 +00:00
..
event-path-test-helpers.js
green-div.css
green-host.css
media-query-in-shadow-style-frame.html
shared-resolver-host-invalidation.css REGRESSION (maybe r276882): custom properties not available on host on initial paint 2021-06-04 18:52:23 +00:00
start.html