| Index: Source/core/editing/Editor.cpp
|
| diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
|
| index 9c8d5c782a89505c02842fd7d0d80745a24bce75..272259e810ca9bb07fe45001791218e6f3edbf6f 100644
|
| --- a/Source/core/editing/Editor.cpp
|
| +++ b/Source/core/editing/Editor.cpp
|
| @@ -1042,7 +1042,7 @@ void Editor::transpose()
|
| String transposed = text.right(1) + text.left(1);
|
|
|
| // Select the two characters.
|
| - if (newSelection != frame().selection().selection())
|
| + if (!VisibleSelection::InDOMTree::equalSelections(newSelection, frame().selection().selection()))
|
| frame().selection().setSelection(newSelection);
|
|
|
| // Insert the transposed characters.
|
| @@ -1069,7 +1069,7 @@ void Editor::changeSelectionAfterCommand(const VisibleSelection& newSelection,
|
| return;
|
|
|
| // See <rdar://problem/5729315> Some shouldChangeSelectedDOMRange contain Ranges for selections that are no longer valid
|
| - bool selectionDidNotChangeDOMPosition = newSelection == frame().selection().selection();
|
| + bool selectionDidNotChangeDOMPosition = VisibleSelection::InDOMTree::equalSelections(newSelection, frame().selection().selection());
|
| frame().selection().setSelection(newSelection, options);
|
|
|
| // Some editing operations change the selection visually without affecting its position within the DOM.
|
|
|