|
|
Introduce TextBuffer as Output Type of copyTextTo() for Text Iterators
For backwards text iterators, their |copyTextTo()| function prepends
text to the output buffer. It causes performance issues when repeatedly
prepending to vectors.
This CL introduces TextBuffer as the output class of |copyTextTo()|. The
new class wraps |WTF::Vector|, and can grow either forwards or backwards
according to its template parameter. It ensures linear time complexity
of |copyTextTo()| regardless of the direction of the text iterator.
This is part of a bigger CL [1].
[1] https://codereview.chromium.org/1604783002
BUG=n/a
Total comments: 18
Total comments: 8
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+296 lines, -112 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/core.gypi
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/VisibleUnits.cpp
|
View
|
1
2
|
6 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/CharacterIterator.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SearchBuffer.cpp
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.h
|
View
|
1
|
3 chunks |
+5 lines, -25 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
|
View
|
1
2
|
1 chunk |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIteratorTest.cpp
|
View
|
|
3 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/Source/core/editing/iterators/TextBuffer.h
|
View
|
1
2
|
1 chunk |
+72 lines, -0 lines |
7 comments
|
Download
|
 |
A |
third_party/WebKit/Source/core/editing/iterators/TextBuffer.cpp
|
View
|
1
2
|
1 chunk |
+67 lines, -0 lines |
2 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIterator.h
|
View
|
1
|
2 chunks |
+4 lines, -12 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTest.cpp
|
View
|
|
2 chunks |
+16 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
|
View
|
|
2 chunks |
+2 lines, -19 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
|
View
|
1
2
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/editing/iterators/WordAwareIterator.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/mac/WebSubstringUtil.mm
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 10 (3 generated)
|