Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp

Issue 1920833002: Don't force layout of descendants of SVG containers needing self-layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify comments. Make some methods private. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698