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

Unified Diff: Source/core/rendering/svg/SVGRootInlineBox.cpp

Issue 19337002: Introduce toSVGInlineFlowBox() and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 5 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 | « Source/core/rendering/svg/SVGInlineFlowBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGRootInlineBox.cpp
diff --git a/Source/core/rendering/svg/SVGRootInlineBox.cpp b/Source/core/rendering/svg/SVGRootInlineBox.cpp
index 03b364bc93ef1fd9e2a65ed69fdccd00a2ffa6b6..f81e128044e92e00749640f166ad0789997e0571 100644
--- a/Source/core/rendering/svg/SVGRootInlineBox.cpp
+++ b/Source/core/rendering/svg/SVGRootInlineBox.cpp
@@ -50,7 +50,7 @@ void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni
if (child->isSVGInlineTextBox())
toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
- static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
+ toSVGInlineFlowBox(child)->paintSelectionBackground(childPaintInfo);
}
}
@@ -112,9 +112,7 @@ void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGText
if (!node)
continue;
- ASSERT_WITH_SECURITY_IMPLICATION(child->isInlineFlowBox());
-
- SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
+ SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
bool isTextPath = node->hasTagName(SVGNames::textPathTag);
if (isTextPath) {
// Build text chunks for all <textPath> children, using the line layout algorithm.
@@ -152,9 +150,7 @@ void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, FloatRect* childRe
if (!child->renderer()->node())
continue;
- ASSERT_WITH_SECURITY_IMPLICATION(child->isInlineFlowBox());
-
- SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
+ SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
layoutChildBoxes(flowBox);
boxRect = flowBox->calculateBoundaries();
« no previous file with comments | « Source/core/rendering/svg/SVGInlineFlowBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698