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

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

Issue 18309003: Inroduce toSVGInlineTextBox, and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/RenderSVGInlineText.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGInlineFlowBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineFlowBox.cpp b/Source/core/rendering/svg/SVGInlineFlowBox.cpp
index 71303d6a418dfd45456810c5bac163478c7ae7b6..b93687ae0beb3f001b5f8dc7c44b519d52dddbb0 100644
--- a/Source/core/rendering/svg/SVGInlineFlowBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineFlowBox.cpp
@@ -41,7 +41,7 @@ void SVGInlineFlowBox::paintSelectionBackground(PaintInfo& paintInfo)
PaintInfo childPaintInfo(paintInfo);
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
- static_cast<SVGInlineTextBox*>(child)->paintSelectionBackground(childPaintInfo);
+ toSVGInlineTextBox(child)->paintSelectionBackground(childPaintInfo);
else if (child->isSVGInlineFlowBox())
static_cast<SVGInlineFlowBox*>(child)->paintSelectionBackground(childPaintInfo);
}
@@ -59,7 +59,7 @@ void SVGInlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni
if (renderingContext.isRenderingPrepared()) {
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox())
- computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(static_cast<SVGInlineTextBox*>(child)->textRenderer()));
+ computeTextMatchMarkerRectForRenderer(toRenderSVGInlineText(toSVGInlineTextBox(child)->textRenderer()));
child->paint(paintInfo, LayoutPoint(), 0, 0);
}
@@ -105,7 +105,7 @@ void SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer(RenderSVGInlineText
if (!box->isSVGInlineTextBox())
continue;
- SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(box);
+ SVGInlineTextBox* textBox = toSVGInlineTextBox(box);
int markerStartPosition = max<int>(marker->startOffset() - textBox->start(), 0);
int markerEndPosition = min<int>(marker->endOffset() - textBox->start(), textBox->len());
« no previous file with comments | « Source/core/rendering/svg/RenderSVGInlineText.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698