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

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

Issue 2832123002: Do not count extra trailing space for the last word in a range (Closed)
Patch Set: getElementById Created 3 years, 8 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: third_party/WebKit/Source/core/editing/iterators/TextIteratorBehavior.h
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorBehavior.h b/third_party/WebKit/Source/core/editing/iterators/TextIteratorBehavior.h
index fe4a7123b8489f8501d7c9f5456bf077cb62c541..4cd77c9d3c6de165fc000b06768ef744e6cef51e 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorBehavior.h
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorBehavior.h
@@ -42,11 +42,15 @@ class CORE_EXPORT TextIteratorBehavior final {
bool ForWindowFind() const { return for_window_find_; }
bool IgnoresStyleVisibility() const { return ignores_style_visibility_; }
bool StopsOnFormControls() const { return stops_on_form_controls_; }
+ bool DoesNotEmitSpaceBeyondRangeEnd() const {
+ return does_not_emit_space_beyond_range_end_;
+ }
static TextIteratorBehavior EmitsObjectReplacementCharacterBehavior();
static TextIteratorBehavior IgnoresStyleVisibilityBehavior();
static TextIteratorBehavior DefaultRangeLengthBehavior();
static TextIteratorBehavior AllVisiblePositionsRangeLengthBehavior();
+ static TextIteratorBehavior NoTrailingSpaceRangeLengthBehavior();
private:
bool collapse_trailing_space_ : 1;
@@ -64,6 +68,7 @@ class CORE_EXPORT TextIteratorBehavior final {
bool for_window_find_ : 1;
bool ignores_style_visibility_ : 1;
bool stops_on_form_controls_ : 1;
+ bool does_not_emit_space_beyond_range_end_ : 1;
};
class CORE_EXPORT TextIteratorBehavior::Builder final {
@@ -89,6 +94,7 @@ class CORE_EXPORT TextIteratorBehavior::Builder final {
Builder& SetForWindowFind(bool);
Builder& SetIgnoresStyleVisibility(bool);
Builder& SetStopsOnFormControls(bool);
+ Builder& SetDoesNotEmitSpaceBeyondRangeEnd(bool);
private:
TextIteratorBehavior behavior_;

Powered by Google App Engine
This is Rietveld 408576698