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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 2374183004: Make non-null VisibleSelections creatable only by createVisibleSelection[Deprecated] (Closed)
Patch Set: Fix mac compile error Created 4 years, 3 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: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index 75a511750603f778f02c9f6a4b1dff32a8d1591e..7a5800dc028cec42a5e5bfeb05c8cc23a57875ad 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -1561,9 +1561,9 @@ void ReplaceSelectionCommand::completeHTMLReplacement(const Position &lastPositi
m_endOfInsertedRange = end;
if (m_selectReplacement)
- setEndingSelection(VisibleSelection(start, end, SelDefaultAffinity, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(start, end, SelDefaultAffinity, endingSelection().isDirectional()));
else
- setEndingSelection(VisibleSelection(end, SelDefaultAffinity, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(end, SelDefaultAffinity, endingSelection().isDirectional()));
}
void ReplaceSelectionCommand::mergeTextNodesAroundPosition(Position& position, Position& positionOnlyToBeUpdated, EditingState* editingState)
@@ -1738,7 +1738,7 @@ bool ReplaceSelectionCommand::performTrivialReplace(const ReplacementFragment& f
m_startOfInsertedRange = start;
m_endOfInsertedRange = end;
- VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, end);
+ VisibleSelection selectionAfterReplace = createVisibleSelectionDeprecated(m_selectReplacement ? start : end, end);
setEndingSelection(selectionAfterReplace);

Powered by Google App Engine
This is Rietveld 408576698