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

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

Issue 2541163003: Fix TextIterator's behavior with first-letter (Closed)
Patch Set: Mon Dec 5 18:00:48 JST 2016 Created 4 years 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
Index: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
index 03a122c9a3f180e8a36aacb3865187b0e17a7cd0..fc4cb53757fb3ccc18b5bd82606105dca4617645 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
@@ -68,6 +68,7 @@ class CORE_EXPORT TextIteratorTextState {
Node* positionNode() const { return m_positionNode; }
bool hasEmitted() const { return m_hasEmitted; }
UChar lastCharacter() const { return m_lastCharacter; }
+ int textStartOffset() const { return m_textStartOffset; }
void resetRunInformation() {
m_positionNode = nullptr;
m_textLength = 0;
@@ -98,6 +99,10 @@ class CORE_EXPORT TextIteratorTextState {
bool m_hasEmitted;
UChar m_lastCharacter;
bool m_emitsOriginalText;
+
+ // Stores the length of :first-letter when we are at the remaining text.
+ // Equals to 0 in all other cases.
+ int m_textStartOffset;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698