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

Unified Diff: Source/core/editing/VisibleUnits.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/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleUnits.cpp
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
index c11b6d583a19d60052c6d25b19a9247fd95e819f..64518ec2174effabb75b274eda7c18bbd87dbaac 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -297,10 +297,10 @@ static TextBreakIterator* wordBreakIteratorForMinOffsetBoundary(const VisiblePos
string.clear();
if (previousBox) {
previousBoxLength = previousBox->len();
- previousBox->textRenderer().text().appendTo(string, previousBox->start(), previousBoxLength);
+ previousBox->renderer().text().appendTo(string, previousBox->start(), previousBoxLength);
len += previousBoxLength;
}
- textBox->textRenderer().text().appendTo(string, textBox->start(), textBox->len());
+ textBox->renderer().text().appendTo(string, textBox->start(), textBox->len());
len += textBox->len();
return wordBreakIterator(string.data(), len);
@@ -316,10 +316,10 @@ static TextBreakIterator* wordBreakIteratorForMaxOffsetBoundary(const VisiblePos
int len = 0;
string.clear();
- textBox->textRenderer().text().appendTo(string, textBox->start(), textBox->len());
+ textBox->renderer().text().appendTo(string, textBox->start(), textBox->len());
len += textBox->len();
if (nextBox) {
- nextBox->textRenderer().text().appendTo(string, nextBox->start(), nextBox->len());
+ nextBox->renderer().text().appendTo(string, nextBox->start(), nextBox->len());
len += nextBox->len();
}
@@ -386,7 +386,7 @@ static VisiblePosition visualWordPosition(const VisiblePosition& visiblePosition
else if (offsetInBox == box->caretMaxOffset())
iter = wordBreakIteratorForMaxOffsetBoundary(visiblePosition, textBox, nextBoxInDifferentBlock, string, leafBoxes);
else if (movingIntoNewBox) {
- iter = wordBreakIterator(textBox->textRenderer().text(), textBox->start(), textBox->len());
+ iter = wordBreakIterator(textBox->renderer().text(), textBox->start(), textBox->len());
previouslyVisitedBox = box;
}
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/inspector/InspectorCSSAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698