Summary: | REGRESSION (r276882): custom properties not available on host on initial paint | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | vb | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Critical | CC: | bfulgham, koivisto, sam, simon.fraser, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari Technology Preview | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
vb
2021-06-03 02:41:58 PDT
I think the bug was introduced in Safari Technology Preview 125. Looks like a style invalidation issue with external stylesheets in a shadow tree. We noticed it on a larger project. Some parts of the stylesheet are applied. E.g the black border in the example is in place even on first paint. Right, it looks like variables are not being inherited to the shadow tree correctly. The issue is that we fail to invalidate the shadow host style when switching from empty shared style resolver to non-empty one. Variables set on the host won't be resolved and fail to inherit to the shadow trees. Created attachment 430581 [details]
patch
Comment on attachment 430581 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=430581&action=review > Source/WebCore/style/StyleInvalidator.cpp:393 > + if (!resolver) > + return true; Would it be simpler to do the !resolver check and invalidations up-front? > Would it be simpler to do the !resolver check and invalidations up-front?
I suppose the invalidation could go to helper lambdas but I feel this is pretty readable as-is.
Thanks for a good test case vb@bigdot.de! Committed r278478 (238496@main): <https://commits.webkit.org/238496@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430581 [details]. |