| Index: Source/core/layout/svg/SVGResourcesCache.cpp
|
| diff --git a/Source/core/layout/svg/SVGResourcesCache.cpp b/Source/core/layout/svg/SVGResourcesCache.cpp
|
| index d58b141e3e78a65a0e2c7808e9ab13784c6b63c9..a1079ffc45a392a357146c8e1c76c25c551974aa 100644
|
| --- a/Source/core/layout/svg/SVGResourcesCache.cpp
|
| +++ b/Source/core/layout/svg/SVGResourcesCache.cpp
|
| @@ -116,7 +116,6 @@ void SVGResourcesCache::clientStyleChanged(LayoutObject* layoutObject, StyleDiff
|
| {
|
| ASSERT(layoutObject);
|
| ASSERT(layoutObject->node());
|
| - ASSERT(layoutObject->node()->isSVGElement());
|
|
|
| if (!diff.hasDifference() || !layoutObject->parent())
|
| return;
|
| @@ -125,6 +124,10 @@ void SVGResourcesCache::clientStyleChanged(LayoutObject* layoutObject, StyleDiff
|
| if (layoutObject->isSVGResourceFilterPrimitive() && !diff.needsLayout())
|
| return;
|
|
|
| + // If it's not an SVGElement, we can leave early because none of the below will have any effect.
|
| + if (!layoutObject->node()->isSVGElement())
|
| + return;
|
| +
|
| // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a layoutObject.
|
| // FIXME: Avoid passing in a useless StyleDifference, but instead compare oldStyle/newStyle to see which resources changed
|
| // to be able to selectively rebuild individual resources, instead of all of them.
|
|
|