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

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.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/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index ff59f692da5e64999f8a10ff005688fa94c4e27b..d4d06c595bcdf07856ac7eb03f2da0c32976ebe5 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -160,7 +160,7 @@ void DeleteSelectionCommand::setStartingSelectionOnSmartDelete(const Position& s
bool isBaseFirst = startingSelection().isBaseFirst();
VisiblePosition newBase = createVisiblePositionDeprecated(isBaseFirst ? start : end);
VisiblePosition newExtent = createVisiblePositionDeprecated(isBaseFirst ? end : start);
- setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection().isDirectional()));
+ setStartingSelection(createVisibleSelectionDeprecated(newBase, newExtent, startingSelection().isDirectional()));
}
void DeleteSelectionCommand::initializePositionData(EditingState* editingState)
@@ -882,7 +882,7 @@ void DeleteSelectionCommand::doApply(EditingState* editingState)
return;
if (brResult) {
calculateTypingStyleAfterDelete();
- setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(m_endingPosition, affinity, endingSelection().isDirectional()));
clearTransientState();
rebalanceWhitespace();
return;
@@ -930,7 +930,7 @@ void DeleteSelectionCommand::doApply(EditingState* editingState)
calculateTypingStyleAfterDelete();
- setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(m_endingPosition, affinity, endingSelection().isDirectional()));
clearTransientState();
}

Powered by Google App Engine
This is Rietveld 408576698