Chromium Code Reviews| 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(); |