[webkit-changes] [WebKit/WebKit] 64eee9: Rebuild SVGResources when relevant style property ...
Cameron McCormack
noreply at github.com
Fri Nov 4 13:26:34 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 64eee924e80890ac154ac53e1836fb7a4d4d9916
https://github.com/WebKit/WebKit/commit/64eee924e80890ac154ac53e1836fb7a4d4d9916
Author: Cameron McCormack <heycam at apple.com>
Date: 2022-11-04 (Fri, 04 Nov 2022)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/mac-monterey-wk2-lbse-text/TestExpectations
M Source/WebCore/rendering/svg/SVGResourcesCache.cpp
Log Message:
-----------
Rebuild SVGResources when relevant style property changes even with StyleDifference::Equal
https://bugs.webkit.org/show_bug.cgi?id=243808
rdar://97335496
Reviewed by Said Abou-Hallawa.
Consulting the StyleDifference value in
SVGResourceCache::clientStyleChanged is not an accurate way to determine
whether any property values were changed.
Specifically, if only the filter property is changed, RenderStyle::diff
returns StyleDifference::Equal and includes filter in the list of
"context-sensitive properties". If the context condition is met (which
per RenderElement::adjustStyleDifference is hasLayer()), we'll upgrade
the StyleDifference to some other value. But if not, which is the case
for SVG elements currently, we'll end up returning early from
SVGResourceCache::clientStyleChanged, and won't rebuild resources in
response to a property change.
This patch removes the early return on StyleDifference::Equal. (The
other use of the StyleDifference in this function, to avoid some work
when filter primitive properties are changed, is OK, since the
properties they care about will return accurate StyleDifference values.)
An alternative approach would be to introduce a new StyleDifference
value "UpdateSVGResources" to use when !hasLayer() and the filter
property changes.
* Source/WebCore/rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
Canonical link: https://commits.webkit.org/256335@main
More information about the webkit-changes
mailing list