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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionTemplate.cpp

Issue 2973583002: Get rid of SelectionTemplate::has_trailing_whitespace_ (Closed)
Patch Set: 2017-07-05T15:40:09 Created 3 years, 5 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/SelectionTemplate.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
index f7afdf5d0108d08242033f0d0bd2be0a550fd8b1..06efd7f868eef203c581b12ef79f87c76a88eddb 100644
--- a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
@@ -15,7 +15,6 @@ SelectionTemplate<Strategy>::SelectionTemplate(const SelectionTemplate& other)
extent_(other.extent_),
affinity_(other.affinity_),
granularity_(other.granularity_),
- has_trailing_whitespace_(other.has_trailing_whitespace_),
is_directional_(other.is_directional_),
is_handle_visible_(other.is_handle_visible_)
#if DCHECK_IS_ON()
@@ -24,9 +23,6 @@ SelectionTemplate<Strategy>::SelectionTemplate(const SelectionTemplate& other)
#endif
{
DCHECK(other.AssertValid());
- if (!has_trailing_whitespace_)
- return;
- DCHECK_EQ(granularity_, kWordGranularity) << *this;
}
template <typename Strategy>
@@ -44,7 +40,6 @@ bool SelectionTemplate<Strategy>::operator==(
DCHECK_EQ(base_.GetDocument(), other.GetDocument()) << *this << ' ' << other;
return base_ == other.base_ && extent_ == other.extent_ &&
affinity_ == other.affinity_ && granularity_ == other.granularity_ &&
- has_trailing_whitespace_ == other.has_trailing_whitespace_ &&
is_directional_ == other.is_directional_ &&
is_handle_visible_ == other.is_handle_visible_;
}
@@ -317,14 +312,6 @@ SelectionTemplate<Strategy>::Builder::SetGranularity(
template <typename Strategy>
typename SelectionTemplate<Strategy>::Builder&
-SelectionTemplate<Strategy>::Builder::SetHasTrailingWhitespace(
- bool has_trailing_whitespace) {
- selection_.has_trailing_whitespace_ = has_trailing_whitespace;
- return *this;
-}
-
-template <typename Strategy>
-typename SelectionTemplate<Strategy>::Builder&
SelectionTemplate<Strategy>::Builder::SetIsDirectional(bool is_directional) {
selection_.is_directional_ = is_directional;
return *this;

Powered by Google App Engine
This is Rietveld 408576698