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

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

Issue 2875933004: Utilize Position::IsEquivalent() in {Up,Down}streamIgnoringEditingBoundaries() (Closed)
Patch Set: 2017-05-12T18:26:21 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/VisibleUnits.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/Position.cpp
diff --git a/third_party/WebKit/Source/core/editing/Position.cpp b/third_party/WebKit/Source/core/editing/Position.cpp
index 0e2032eccc2815a65af2e58c08ac5c9e8613fefd..eab61e4ba6df3f245d5175760b3664b13d1dca26 100644
--- a/third_party/WebKit/Source/core/editing/Position.cpp
+++ b/third_party/WebKit/Source/core/editing/Position.cpp
@@ -355,6 +355,8 @@ bool PositionTemplate<Strategy>::operator>=(
template <typename Strategy>
bool PositionTemplate<Strategy>::IsEquivalent(
const PositionTemplate<Strategy>& other) const {
+ if (IsNull())
Xiaocheng 2017/05/12 18:00:05 This should go to the previous patch.
yoichio 2017/05/15 01:41:53 I oppose this change from the math sense. For exam
yosin_UTC9 2017/05/15 05:12:57 Oops, I missed rebasing.
+ return other.IsNull();
if (anchor_type_ == other.anchor_type_)
return *this == other;
return ToOffsetInAnchor() == other.ToOffsetInAnchor();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698