| 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.
|
|
|