Index: Source/core/editing/VisibleSelection.h |
diff --git a/Source/core/editing/VisibleSelection.h b/Source/core/editing/VisibleSelection.h |
index 1e647e5c0a081ebb3bd9d341ead9d703004d81f3..4b51859d0f292cad40aff746b3786a3e0e8d29be 100644 |
--- a/Source/core/editing/VisibleSelection.h |
+++ b/Source/core/editing/VisibleSelection.h |
@@ -181,8 +181,14 @@ 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() |
- && a.isDirectional() == b.isDirectional(); |
+ if (a.affinity() != b.affinity() || a.isDirectional() != b.isDirectional()) |
+ return false; |
+ |
+ if (a.isNone()) |
+ return b.isNone(); |
+ |
+ return a.start() == b.start() && a.end() == b.end() && a.affinity() == b.affinity() |
+ && a.isDirectional() == b.isDirectional() && a.base() == b.base() && a.extent() == b.extent(); |
} |
inline bool operator!=(const VisibleSelection& a, const VisibleSelection& b) |