Commit 786acb8d authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Chromium LUCI CQ

Check for an existing SVGResourceClient before invalidating filter

In some fairly generic code-paths we can have a 'filter' property while
not actually applying it - and thus don't have a SVGResourceClient.
(For example for 'filter' on <feImage>.)

Bug: 1158392, 1028063
Change-Id: I12bf8b6120a17f750582f037d59951a565731210
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2589837
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836776}
parent de231c7c
......@@ -352,8 +352,10 @@ SVGResourceInvalidator::SVGResourceInvalidator(LayoutObject& object)
void SVGResourceInvalidator::InvalidateEffects() {
const ComputedStyle& style = object_.StyleRef();
if (style.HasFilter() && style.Filter().HasReferenceFilter())
SVGResources::GetClient(object_)->InvalidateFilterData();
if (style.HasFilter() && style.Filter().HasReferenceFilter()) {
if (SVGElementResourceClient* client = SVGResources::GetClient(object_))
client->InvalidateFilterData();
}
if (style.ClipPath()) {
object_.SetShouldDoFullPaintInvalidation();
object_.InvalidateClipPathCache();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment