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

Unified Diff: Source/WebCore/svg/SVGElementInstance.cpp

Issue 7396010: Merge 91005 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | « Source/WebCore/svg/SVGElementInstance.h ('k') | Source/WebCore/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/svg/SVGElementInstance.cpp
===================================================================
--- Source/WebCore/svg/SVGElementInstance.cpp (revision 91149)
+++ Source/WebCore/svg/SVGElementInstance.cpp (working copy)
@@ -70,6 +70,11 @@
// Deregister as instance for passed element.
m_element->removeInstanceMapping(this);
+ clearChildren();
+}
+
+void SVGElementInstance::clearChildren()
+{
removeAllChildrenInContainer<SVGElementInstance, SVGElementInstance>(this);
}
@@ -105,8 +110,10 @@
const HashSet<SVGElementInstance*>::const_iterator end = set.end();
for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != end; ++it) {
ASSERT((*it)->correspondingElement() == element);
- if (SVGUseElement* element = (*it)->correspondingUseElement())
+ if (SVGUseElement* element = (*it)->correspondingUseElement()) {
+ ASSERT(element->inDocument());
element->invalidateShadowTree();
+ }
}
// Be sure to rebuild use trees, if needed
« no previous file with comments | « Source/WebCore/svg/SVGElementInstance.h ('k') | Source/WebCore/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698