Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp |
index 4c95c4a9b3a672ae3c79dfa53bceb4a841face6b..d7ca9bd4e47967f2706be861927210e7c595504e 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp |
@@ -245,14 +245,13 @@ void LayoutSVGResourceContainer::registerResource() |
// If the client has a layer (is a non-SVGElement) we need to signal |
// invalidation in the same way as is done in markAllResourceClientsForInvalidation above. |
if (layoutObject->hasLayer() && resourceType() == FilterResourceType) { |
- if (style.hasFilter()) |
- toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintInvalidation(); |
- // If this is the SVG root, we could have both 'filter' and |
- // '-webkit-filter' applied, so we need to do the invalidation |
- // below as well, unless we can optimistically determine that |
- // 'filter' does not apply to the element in question. |
- if (!layoutObject->isSVGRoot() || !style.svgStyle().hasFilter()) |
+ if (!style.hasFilter()) |
continue; |
+ toLayoutBoxModelObject(layoutObject)->layer()->filterNeedsPaintInvalidation(); |
+ if (!layoutObject->isSVGRoot()) |
+ continue; |
+ // A root SVG element with a filter, however, still needs to run |
+ // the full invalidation step below. |
} |
StyleDifference diff; |