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

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

Issue 2914313002: Manage DOM and string offsets separately in TextIteratorTextState (Closed)
Patch Set: Fri Jun 2 10:34:55 PDT 2017 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 | « no previous file | third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
index 2a1c2e8aa25bfdcac1d63d6704796f6c9f5720c5..67842006bac0b2a4f0a536e179cf3989e65e4c31 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -875,7 +875,7 @@ template <typename Strategy>
int TextIteratorAlgorithm<Strategy>::StartOffsetInCurrentContainer() const {
if (text_state_->PositionNode()) {
text_state_->FlushPositionOffsets();
- return text_state_->PositionStartOffset() + text_state_->TextStartOffset();
+ return text_state_->PositionStartOffset();
}
DCHECK(end_container_);
return end_offset_;
@@ -885,7 +885,7 @@ template <typename Strategy>
int TextIteratorAlgorithm<Strategy>::EndOffsetInCurrentContainer() const {
if (text_state_->PositionNode()) {
text_state_->FlushPositionOffsets();
- return text_state_->PositionEndOffset() + text_state_->TextStartOffset();
+ return text_state_->PositionEndOffset();
}
DCHECK(end_container_);
return end_offset_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698