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

Unified Diff: Source/core/editing/commands/BreakBlockquoteCommand.cpp

Issue 1317053004: Make VisiblePosition constructor private (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-01T18:48:19 Created 5 years, 4 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/commands/BreakBlockquoteCommand.cpp
diff --git a/Source/core/editing/commands/BreakBlockquoteCommand.cpp b/Source/core/editing/commands/BreakBlockquoteCommand.cpp
index 8cf20eca4fb26f70ca47948c8a1c3e23fcc78aa4..616fdaf112b39bb0ae1ec5c4ed04c6f9916fdbd5 100644
--- a/Source/core/editing/commands/BreakBlockquoteCommand.cpp
+++ b/Source/core/editing/commands/BreakBlockquoteCommand.cpp
@@ -133,7 +133,7 @@ void BreakBlockquoteCommand::doApply()
}
// Adjust the position so we don't split at the beginning of a quote.
- while (isFirstVisiblePositionInNode(VisiblePosition(pos), toHTMLQuoteElement(enclosingNodeOfType(pos, isMailHTMLBlockquoteElement)))) {
+ while (isFirstVisiblePositionInNode(createVisiblePosition(pos), toHTMLQuoteElement(enclosingNodeOfType(pos, isMailHTMLBlockquoteElement)))) {
// TODO(yosin) We should use |PositionMoveType::Character| for
// |previousPositionOf()| to avoid editing middle character.
pos = previousPositionOf(pos, PositionMoveType::CodePoint);
@@ -161,7 +161,7 @@ void BreakBlockquoteCommand::doApply()
// If there's nothing inside topBlockquote to move, we're finished.
if (!startNode->isDescendantOf(topBlockquote)) {
- setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
+ setEndingSelection(VisibleSelection(createVisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
return;
}

Powered by Google App Engine
This is Rietveld 408576698