Chromium Code Reviews| Index: Source/core/editing/VisibleSelection.cpp |
| diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp |
| index 0b39efb9a635dfa0b11f3d2b5143a10a0a25a017..814ddef302fb56e0251dd663d876fb10d8e417ac 100644 |
| --- a/Source/core/editing/VisibleSelection.cpp |
| +++ b/Source/core/editing/VisibleSelection.cpp |
| @@ -1155,7 +1155,14 @@ void VisibleSelection::validatePositionsIfNeeded() |
| bool VisibleSelection::InDOMTree::equalSelections(const VisibleSelection& selection1, const VisibleSelection& selection2) |
| { |
| - return selection1 == selection2; |
| + if (selection1.affinity() != selection2.affinity() || selection1.isDirectional() != selection2.isDirectional()) |
|
hajimehoshi
2015/06/24 06:48:45
Why is this needed? This seems redundant. The comp
yosin_UTC9
2015/06/24 07:02:52
I just copied from original code.
It seems we nee
|
| + return false; |
| + |
| + if (selection1.isNone()) |
|
hajimehoshi
2015/06/24 06:48:45
This could also be redundant, but I'm not sure. Wh
yosin_UTC9
2015/06/24 07:02:52
I just copied from original code.
If we should rem
|
| + return selection2.isNone(); |
| + |
| + return selection1.start() == selection2.start() && selection1.end() == selection2.end() && selection1.affinity() == selection2.affinity() |
| + && selection1.isDirectional() == selection2.isDirectional() && selection1.base() == selection2.base() && selection1.extent() == selection2.extent(); |
| } |
| bool VisibleSelection::InComposedTree::equalSelections(const VisibleSelection& a, const VisibleSelection& b) |