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

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

Issue 2126743002: Make previousPositionOf() to handle yet another no previous position case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-06T16:42:17 Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnitsTest.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/VisibleUnits.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
index 7b30823c64f843c49fe293a8b9f2e95f80c05adc..797c2e7516347a9a0e929e5c4afda5182c7816d0 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -3232,7 +3232,8 @@ static VisiblePositionTemplate<Strategy> previousPositionOfAlgorithm(const Visib
// never yield another |TextAffinity::Upstream position| (unless line wrap
// length is 0!).
const VisiblePositionTemplate<Strategy> prev = createVisiblePosition(pos);
- DCHECK_NE(prev.deepEquivalent(), visiblePosition.deepEquivalent());
+ if (prev.deepEquivalent() == visiblePosition.deepEquivalent())
+ return VisiblePositionTemplate<Strategy>();
switch (rule) {
case CanCrossEditingBoundary:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698