| Index: Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
 | 
| diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
 | 
| index 55dc71f7ab71e0af722c755874900b889f7cfeea..c11ee7532ec01c59658c4dbd3db4a0bde47a4e71 100644
 | 
| --- a/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
 | 
| +++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.cpp
 | 
| @@ -183,27 +183,22 @@ void SVGTextMetricsBuilder::measureTextRenderer(RenderSVGInlineText* text, Measu
 | 
|  
 | 
|  void SVGTextMetricsBuilder::walkTree(RenderObject* start, RenderSVGInlineText* stopAtLeaf, MeasureTextData* data)
 | 
|  {
 | 
| -    for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) {
 | 
| +    RenderObject* child = start->firstChild();
 | 
| +    while (child) {
 | 
|          if (child->isSVGInlineText()) {
 | 
|              RenderSVGInlineText* text = toRenderSVGInlineText(child);
 | 
| -            if (stopAtLeaf && stopAtLeaf != text) {
 | 
| -                data->processRenderer = false;
 | 
| -                measureTextRenderer(text, data);
 | 
| -                continue;
 | 
| -            }
 | 
| -
 | 
| -            data->processRenderer = true;
 | 
| +            data->processRenderer = !stopAtLeaf || stopAtLeaf == text;
 | 
|              measureTextRenderer(text, data);
 | 
| -            if (stopAtLeaf)
 | 
| +            if (stopAtLeaf && stopAtLeaf == text)
 | 
|                  return;
 | 
| -
 | 
| -            continue;
 | 
| +        } else if (child->isSVGInline()) {
 | 
| +            // Visit children of text content elements.
 | 
| +            if (RenderObject* inlineChild = child->firstChild()) {
 | 
| +                child = inlineChild;
 | 
| +                continue;
 | 
| +            }
 | 
|          }
 | 
| -
 | 
| -        if (!child->isSVGInline())
 | 
| -            continue;
 | 
| -
 | 
| -        walkTree(child, stopAtLeaf, data);
 | 
| +        child = child->nextInPreOrderAfterChildren(start);
 | 
|      }
 | 
|  }
 | 
|  
 | 
| 
 |