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

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

Issue 1089283002: Making VisibleSelection operator== take base and extent into account. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelection.h
diff --git a/Source/core/editing/VisibleSelection.h b/Source/core/editing/VisibleSelection.h
index 75856ea84e53dc33c3ed5fbc93a903cfc1826c55..f9583eb0217c4e33e4f5af6d57afcad5c9f53ca1 100644
--- a/Source/core/editing/VisibleSelection.h
+++ b/Source/core/editing/VisibleSelection.h
@@ -183,7 +183,7 @@ private:
inline bool operator==(const VisibleSelection& a, const VisibleSelection& b)
{
return a.start() == b.start() && a.end() == b.end() && a.affinity() == b.affinity() && a.isBaseFirst() == b.isBaseFirst()
yosin_UTC9 2015/04/16 04:59:04 if one of selections is null, we don't need to che
yosin_UTC9 2015/04/16 04:59:04 Since we compare base/extent equality, we don't ne
mfomitchev 2015/04/16 18:11:32 Added the None check and removed isBaseFirst() che
- && a.isDirectional() == b.isDirectional();
+ && a.isDirectional() == b.isDirectional() && a.base() == b.base() && a.extent() == b.extent();
}
inline bool operator!=(const VisibleSelection& a, const VisibleSelection& b)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698