Index: third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
index b5681822dd7a04521e2faf5719d1af9a1c0e5771..a67e8ed8d2c0614de0ba8d3b01a9dec99d3ab203 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
@@ -261,13 +261,15 @@ bool SVGLayoutSupport::layoutSizeOfNearestViewportChanged(const LayoutObject* st |
bool SVGLayoutSupport::screenScaleFactorChanged(const LayoutObject* ancestor) |
{ |
- while (ancestor && !ancestor->isSVGRoot()) { |
+ for (; ancestor; ancestor = ancestor->parent()) { |
+ if (ancestor->isSVGRoot()) |
+ return toLayoutSVGRoot(ancestor)->didScreenScaleFactorChange(); |
if (ancestor->isSVGTransformableContainer()) |
return toLayoutSVGTransformableContainer(ancestor)->didScreenScaleFactorChange(); |
if (ancestor->isSVGViewportContainer()) |
return toLayoutSVGViewportContainer(ancestor)->didScreenScaleFactorChange(); |
- ancestor = ancestor->parent(); |
} |
+ ASSERT_NOT_REACHED(); |
return false; |
} |