Index: Source/core/svg/SVGElement.cpp |
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
index c3e1e220fba2765be4ffafe1048dde5d442b76da..a44ca471303d9e65d50c58719178d010fffaed64 100644 |
--- a/Source/core/svg/SVGElement.cpp |
+++ b/Source/core/svg/SVGElement.cpp |
@@ -418,11 +418,10 @@ void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope |
TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelativeLengthClientsInvalidation, true); |
#endif |
- LayoutObject* layoutObject = this->layoutObject(); |
- if (layoutObject && selfHasRelativeLengths()) { |
- if (layoutObject->isSVGResourceContainer()) |
+ if (LayoutObject* layoutObject = this->layoutObject()) { |
+ if (hasRelativeLengths() && layoutObject->isSVGResourceContainer()) |
toLayoutSVGResourceContainer(layoutObject)->invalidateCacheAndMarkForLayout(layoutScope); |
- else |
+ else if (selfHasRelativeLengths()) |
layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::Unknown, MarkContainerChain, layoutScope); |
} |