Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1269)

Unified Diff: Source/core/svg/SVGElement.cpp

Issue 1087653004: [svg] Update the <use> shadowtree if a referenced element is removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: alternative Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/svg/custom/use-remove-referenced-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index 79b8806764b2514ceb659a4dba76abcbae5f3c75..e0a312336479d0331318b43a746cbd414eca1f65 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -966,9 +966,6 @@ void SVGElement::markForLayoutAndParentResourceInvalidation(LayoutObject* render
void SVGElement::invalidateInstances()
{
- if (!inDocument())
- return;
-
if (instanceUpdatesBlocked())
return;
@@ -981,14 +978,15 @@ void SVGElement::invalidateInstances()
instance->setCorrespondingElement(0);
if (SVGUseElement* element = instance->correspondingUseElement()) {
- ASSERT(element->inDocument());
- element->invalidateShadowTree();
+ if (element->inDocument())
+ element->invalidateShadowTree();
}
}
svgRareData()->elementInstances().clear();
- document().updateRenderTreeIfNeeded();
+ if (inDocument())
+ document().updateRenderTreeIfNeeded();
}
SVGElement::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* targetElement)
« no previous file with comments | « LayoutTests/svg/custom/use-remove-referenced-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698