| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| index 2b6a5e09bd977ceacdf1460474e70bcbe320114c..984539f47bcc5bd9cb86ce58dddaacd2e0207bfc 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| @@ -411,21 +411,23 @@ void SVGElement::updateRelativeLengthsInformation(bool clientHasRelativeLengths,
|
| // An element wants to notify us that its own relative lengths state changed.
|
| // Register it in the relative length map, and register us in the parent relative length map.
|
| // Register the parent in the grandparents map, etc. Repeat procedure until the root of the SVG tree.
|
| - for (ContainerNode* currentNode = this; currentNode && currentNode->isSVGElement(); currentNode = currentNode->parentNode()) {
|
| - SVGElement* currentElement = toSVGElement(currentNode);
|
| - ASSERT(!currentElement->m_inRelativeLengthClientsInvalidation);
|
| + for (Node& currentNode : NodeTraversal::inclusiveAncestorsOf(*this)) {
|
| + if (!currentNode.isSVGElement())
|
| + break;
|
| + SVGElement& currentElement = toSVGElement(currentNode);
|
| + ASSERT(!currentElement.m_inRelativeLengthClientsInvalidation);
|
|
|
| - bool hadRelativeLengths = currentElement->hasRelativeLengths();
|
| + bool hadRelativeLengths = currentElement.hasRelativeLengths();
|
| if (clientHasRelativeLengths)
|
| - currentElement->m_elementsWithRelativeLengths.add(clientElement);
|
| + currentElement.m_elementsWithRelativeLengths.add(clientElement);
|
| else
|
| - currentElement->m_elementsWithRelativeLengths.remove(clientElement);
|
| + currentElement.m_elementsWithRelativeLengths.remove(clientElement);
|
|
|
| // If the relative length state hasn't changed, we can stop propagating the notification.
|
| - if (hadRelativeLengths == currentElement->hasRelativeLengths())
|
| + if (hadRelativeLengths == currentElement.hasRelativeLengths())
|
| return;
|
|
|
| - clientElement = currentElement;
|
| + clientElement = ¤tElement;
|
| clientHasRelativeLengths = clientElement->hasRelativeLengths();
|
| }
|
|
|
|
|