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 b223120dafd0ce1e9b5b7fd50a45e5bacee4c5b6..aee79b58225a7beefe0e802dff0376012e80571c 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
@@ -247,17 +247,16 @@ const LayoutSVGRoot* SVGLayoutSupport::findTreeRootObject(const LayoutObject* st |
return toLayoutSVGRoot(start); |
} |
-inline bool SVGLayoutSupport::layoutSizeOfNearestViewportChanged(const LayoutObject* start) |
+bool SVGLayoutSupport::layoutSizeOfNearestViewportChanged(const LayoutObject* start) |
{ |
- while (start && !start->isSVGRoot() && !start->isSVGViewportContainer()) |
- start = start->parent(); |
- |
- ASSERT(start); |
- ASSERT(start->isSVGRoot() || start->isSVGViewportContainer()); |
- if (start->isSVGViewportContainer()) |
- return toLayoutSVGViewportContainer(start)->isLayoutSizeChanged(); |
- |
- return toLayoutSVGRoot(start)->isLayoutSizeChanged(); |
+ for (; start; start = start->parent()) { |
+ if (start->isSVGRoot()) |
+ return toLayoutSVGRoot(start)->isLayoutSizeChanged(); |
+ if (start->isSVGViewportContainer()) |
+ return toLayoutSVGViewportContainer(start)->isLayoutSizeChanged(); |
+ } |
+ ASSERT_NOT_REACHED(); |
+ return false; |
} |
bool SVGLayoutSupport::transformToRootChanged(const LayoutObject* ancestor) |
@@ -272,13 +271,8 @@ bool SVGLayoutSupport::transformToRootChanged(const LayoutObject* ancestor) |
return false; |
} |
-void SVGLayoutSupport::layoutChildren(LayoutObject* start, bool forceLayout, bool transformChanged) |
+void SVGLayoutSupport::layoutChildren(LayoutObject* start, bool forceLayout, bool transformChanged, bool layoutSizeChanged) |
{ |
- // When hasRelativeLengths() is false, no descendants have relative lengths |
- // (hence no one is interested in viewport size changes). |
- bool layoutSizeChanged = toSVGElement(start->node())->hasRelativeLengths() |
- && layoutSizeOfNearestViewportChanged(start); |
- |
for (LayoutObject* child = start->slowFirstChild(); child; child = child->nextSibling()) { |
bool forceChildLayout = forceLayout; |