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

Unified Diff: Source/core/rendering/InlineFlowBox.cpp

Issue 414863002: Minimize RenderObject* casting to RenderText* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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/page/TouchAdjustment.cpp ('k') | Source/core/rendering/InlineTextBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineFlowBox.cpp
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp
index a02e9794fe8a33e3078dc62a8f0eff0580ad0e56..e3186f53ad096fda8188518c2c37395e5951cce6 100644
--- a/Source/core/rendering/InlineFlowBox.cpp
+++ b/Source/core/rendering/InlineFlowBox.cpp
@@ -381,7 +381,7 @@ float InlineFlowBox::placeBoxRangeInInlineDirection(InlineBox* firstChild, Inlin
for (InlineBox* curr = firstChild; curr && curr != lastChild; curr = curr->nextOnLine()) {
if (curr->renderer().isText()) {
InlineTextBox* text = toInlineTextBox(curr);
- RenderText& rt = toRenderText(text->renderer());
+ RenderText& rt = text->renderer();
if (rt.textLength()) {
if (needsWordSpacing && isSpaceOrNewline(rt.characterAt(text->start())))
logicalLeft += rt.style(isFirstLineStyle())->font().fontDescription().wordSpacing();
@@ -956,7 +956,7 @@ void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, G
if (curr->renderer().isText()) {
InlineTextBox* text = toInlineTextBox(curr);
- RenderText& rt = toRenderText(text->renderer());
+ RenderText& rt = text->renderer();
if (rt.isBR())
continue;
LayoutRect textBoxOverflow(enclosingLayoutRect(text->logicalFrameRect()));
« no previous file with comments | « Source/core/page/TouchAdjustment.cpp ('k') | Source/core/rendering/InlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698