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

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

Issue 2518363003: Refactor InlineBox::calculateBoundaries() (Closed)
Patch Set: Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/layout/svg/line/SVGInlineFlowBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineFlowBox.cpp b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineFlowBox.cpp
index 08b9cc47615cf57c0a71e80f2a255a041ea99a92..83c827c3995f635837c3966ab13c3cd243a5b0fd 100644
--- a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineFlowBox.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineFlowBox.cpp
@@ -37,9 +37,10 @@ void SVGInlineFlowBox::paint(const PaintInfo& paintInfo,
LayoutRect SVGInlineFlowBox::calculateBoundaries() const {
LayoutRect childRect;
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
- if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox())
- continue;
- childRect.unite(child->calculateBoundaries());
+ if (child->isSVGInlineTextBox())
+ childRect.unite(toSVGInlineTextBox(child)->calculateBoundaries());
+ else
+ childRect.unite(toSVGInlineFlowBox(child)->calculateBoundaries());
}
return childRect;
}

Powered by Google App Engine
This is Rietveld 408576698