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

Unified Diff: Source/core/editing/TextIterator.h

Issue 624483002: Make TextIterator not stop at IMG element for finding text separating inline image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
Index: Source/core/editing/TextIterator.h
diff --git a/Source/core/editing/TextIterator.h b/Source/core/editing/TextIterator.h
index cbe398e7ffbd571bdb8c98b7a93d73fa447ff74a..f3b82a19076aa33fffd79d15e4f281456cc6a95a 100644
--- a/Source/core/editing/TextIterator.h
+++ b/Source/core/editing/TextIterator.h
@@ -46,7 +46,8 @@ enum TextIteratorBehavior {
TextIteratorStopsOnFormControls = 1 << 4,
TextIteratorEmitsImageAltText = 1 << 5,
TextIteratorEntersAuthorShadowRoots = 1 << 6,
- TextIteratorEmitsObjectReplacementCharacter = 1 << 7
+ TextIteratorEmitsObjectReplacementCharacter = 1 << 7,
+ TextIteratorBreakAtZeroLengthBoundary = 1 << 8
};
typedef unsigned TextIteratorBehaviorFlags;
@@ -119,6 +120,8 @@ public:
Position startPosition() const;
Position endPosition() const;
+ bool breakAtZeroLengthBoundary() { return m_breakAtZeroLengthBoundary; }
+
// Computes the length of the given range using a text iterator. The default
// iteration behavior is to always emit object replacement characters for
// replaced elements. When |forSelectionPreservation| is set to true, it
@@ -228,6 +231,8 @@ private:
bool m_entersAuthorShadowRoots;
bool m_emitsObjectReplacementCharacter;
+
+ bool m_breakAtZeroLengthBoundary;
};
// Iterates through the DOM range, returning all the text, and 0-length boundaries

Powered by Google App Engine
This is Rietveld 408576698