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

Unified Diff: Source/core/editing/TextInsertionBaseCommand.cpp

Issue 1201423002: Use VisibleSelection::InDOMTree::equalSelections() instead of operator==() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-24T15:30:20 Rebase - exclude FrameSelection Created 5 years, 6 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
Index: Source/core/editing/TextInsertionBaseCommand.cpp
diff --git a/Source/core/editing/TextInsertionBaseCommand.cpp b/Source/core/editing/TextInsertionBaseCommand.cpp
index 690f71fbed7c35c7813b0f6574afe23d56fa502d..8c7c5b268b3e26e328e1e880695992e36ab2432d 100644
--- a/Source/core/editing/TextInsertionBaseCommand.cpp
+++ b/Source/core/editing/TextInsertionBaseCommand.cpp
@@ -42,7 +42,7 @@ TextInsertionBaseCommand::TextInsertionBaseCommand(Document& document)
void TextInsertionBaseCommand::applyTextInsertionCommand(LocalFrame* frame, PassRefPtrWillBeRawPtr<TextInsertionBaseCommand> command, const VisibleSelection& selectionForInsertion, const VisibleSelection& endingSelection)
{
- bool changeSelection = selectionForInsertion != endingSelection;
+ bool changeSelection = !VisibleSelection::InDOMTree::equalSelections(selectionForInsertion, endingSelection);
if (changeSelection) {
command->setStartingSelection(selectionForInsertion);
command->setEndingSelection(selectionForInsertion);

Powered by Google App Engine
This is Rietveld 408576698