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

Unified Diff: third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.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/BreakBlockquoteCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
index ed6a9633137aa6553ed5d71cc70963868ea58646..22a59b0fbe96a2214eb4872fa1e6b996afb69408 100644
--- a/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
@@ -113,7 +113,7 @@ void BreakBlockquoteCommand::doApply(EditingState* editingState)
insertNodeBefore(breakElement, topBlockquote, editingState);
if (editingState->isAborted())
return;
- setEndingSelection(VisibleSelection(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
rebalanceWhitespace();
return;
}
@@ -125,7 +125,7 @@ void BreakBlockquoteCommand::doApply(EditingState* editingState)
// If we're inserting the break at the end of the quoted content, we don't need to break the quote.
if (isLastVisPosInNode) {
- setEndingSelection(VisibleSelection(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
rebalanceWhitespace();
return;
}
@@ -163,7 +163,7 @@ void BreakBlockquoteCommand::doApply(EditingState* editingState)
// If there's nothing inside topBlockquote to move, we're finished.
if (!startNode->isDescendantOf(topBlockquote)) {
- setEndingSelection(VisibleSelection(createVisiblePositionDeprecated(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(createVisiblePositionDeprecated(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
return;
}
@@ -236,7 +236,7 @@ void BreakBlockquoteCommand::doApply(EditingState* editingState)
return;
// Put the selection right before the break.
- setEndingSelection(VisibleSelection(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelectionDeprecated(Position::beforeNode(breakElement), TextAffinity::Downstream, endingSelection().isDirectional()));
rebalanceWhitespace();
}

Powered by Google App Engine
This is Rietveld 408576698