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

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

Issue 23785014: [SVG] Resources should be laid out in dependecy order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Set #3 rebased. Created 7 years, 3 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
Index: Source/core/svg/SVGElement.cpp
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index 2649482c4c99bffe4fc765f2c93b1665b6be2034..99a09ae4b3d689ac9511271b186660800587259f 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -463,6 +463,23 @@ void SVGElement::updateRelativeLengthsInformation(bool hasRelativeLengths, SVGEl
}
}
+void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope)
+{
+ if (!inDocument())
+ return;
+
+ HashSet<SVGElement*>::iterator end = m_elementsWithRelativeLengths.end();
+ for (HashSet<SVGElement*>::iterator it = m_elementsWithRelativeLengths.begin(); it != end; ++it) {
pdr. 2013/09/23 22:26:02 This always scares me. Are we sure nothing in this
f(malita) 2013/09/23 23:20:33 Pretty sure: * the only way to modify m_elementsW
+ if (*it == this)
+ continue;
+
+ if ((*it)->renderer() && (*it)->selfHasRelativeLengths())
+ (*it)->renderer()->setNeedsLayout(MarkContainingBlockChain, layoutScope);
+
+ (*it)->invalidateRelativeLengthClients(layoutScope);
+ }
+}
+
SVGSVGElement* SVGElement::ownerSVGElement() const
{
ContainerNode* n = parentOrShadowHostNode();

Powered by Google App Engine
This is Rietveld 408576698