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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp

Issue 2915863005: Remove TextIteratorTextState::GetString() (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
index f237ddcaf5c04191078cd362c11fe5db1d500cea..b3d8493d8e829d25188ebc0f5c201ed9cdc753cb 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
@@ -55,7 +55,7 @@ UChar TextIteratorTextState::CharacterAt(unsigned index) const {
return single_character_buffer_;
}
- return GetString()[PositionStartOffset() + index];
+ return text_[PositionStartOffset() + index];
}
String TextIteratorTextState::Substring(unsigned position,
@@ -69,7 +69,7 @@ String TextIteratorTextState::Substring(unsigned position,
DCHECK_EQ(length, 1u);
return String(&single_character_buffer_, 1);
}
- return GetString().Substring(PositionStartOffset() + position, length);
+ return text_.Substring(PositionStartOffset() + position, length);
}
void TextIteratorTextState::AppendTextToStringBuilder(
@@ -84,8 +84,7 @@ void TextIteratorTextState::AppendTextToStringBuilder(
DCHECK_EQ(position, 0u);
builder.Append(single_character_buffer_);
} else {
- builder.Append(GetString(), PositionStartOffset() + position,
- length_to_append);
+ builder.Append(text_, PositionStartOffset() + position, length_to_append);
}
}
@@ -193,10 +192,10 @@ void TextIteratorTextState::AppendTextTo(ForwardsTextBuffer* output,
if (PositionNode()) {
FlushPositionOffsets();
unsigned offset = PositionStartOffset() + position;
- if (GetString().Is8Bit())
- output->PushRange(GetString().Characters8() + offset, length_to_append);
+ if (text_.Is8Bit())
+ output->PushRange(text_.Characters8() + offset, length_to_append);
else
- output->PushRange(GetString().Characters16() + offset, length_to_append);
+ output->PushRange(text_.Characters16() + offset, length_to_append);
return;
}
// We shouldn't be attempting to append text that doesn't exist.
« no previous file with comments | « third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698