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

Unified Diff: Source/core/editing/commands/ApplyBlockElementCommand.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/ApplyBlockElementCommand.cpp
diff --git a/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index 25f2d3e18f0b00e1214e453eb0496d752ecd260e..a3cea5487ded7a786f1de2eaed135234b775f0ba 100644
--- a/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -133,7 +133,7 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
atEnd = true;
rangeForParagraphSplittingTextNodesIfNeeded(endOfCurrentParagraph, start, end);
- endOfCurrentParagraph = VisiblePosition(end);
+ endOfCurrentParagraph = createVisiblePosition(end);
Node* enclosingCell = enclosingNodeOfType(start, &isTableCell);
VisiblePosition endOfNextParagraph = endOfNextParagrahSplittingTextNodesIfNeeded(endOfCurrentParagraph, start, end);
@@ -196,7 +196,7 @@ void ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded(const
// TODO(yosin) We should use |PositionMoveType::Character| for
// |previousPositionOf()|.
if (startStyle->preserveNewline() && isNewLineAtPosition(start) && !isNewLineAtPosition(previousPositionOf(start, PositionMoveType::CodePoint)) && start.offsetInContainerNode() > 0)
- start = startOfParagraph(VisiblePosition(previousPositionOf(end, PositionMoveType::CodePoint))).deepEquivalent();
+ start = startOfParagraph(createVisiblePosition(previousPositionOf(end, PositionMoveType::CodePoint))).deepEquivalent();
// If start is in the middle of a text node, split.
if (!startStyle->collapseWhiteSpace() && start.offsetInContainerNode() > 0) {
@@ -283,7 +283,7 @@ VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfN
}
}
- return VisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1));
+ return createVisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1));
}
PassRefPtrWillBeRawPtr<HTMLElement> ApplyBlockElementCommand::createBlockElement() const

Powered by Google App Engine
This is Rietveld 408576698