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

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

Issue 1307803003: Introduce nextPositionOf() for VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-28T18:13:02 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
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/commands/ApplyStyleCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/commands/ApplyBlockElementCommand.cpp
diff --git a/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/Source/core/editing/commands/ApplyBlockElementCommand.cpp
index 20961e6a8b03d3322125008ce92b5448eb7f9dfe..25f2d3e18f0b00e1214e453eb0496d752ecd260e 100644
--- a/Source/core/editing/commands/ApplyBlockElementCommand.cpp
+++ b/Source/core/editing/commands/ApplyBlockElementCommand.cpp
@@ -123,7 +123,7 @@ void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
RefPtrWillBeRawPtr<HTMLElement> blockquoteForNextIndent = nullptr;
VisiblePosition endOfCurrentParagraph = endOfParagraph(startOfSelection);
VisiblePosition endOfLastParagraph = endOfParagraph(endOfSelection);
- VisiblePosition endAfterSelection = endOfParagraph(endOfLastParagraph.next());
+ VisiblePosition endAfterSelection = endOfParagraph(nextPositionOf(endOfLastParagraph));
m_endOfLastParagraph = endOfLastParagraph.deepEquivalent();
bool atEnd = false;
@@ -249,7 +249,7 @@ void ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded(const
VisiblePosition ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded(VisiblePosition& endOfCurrentParagraph, Position& start, Position& end)
{
- VisiblePosition endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next());
+ VisiblePosition endOfNextParagraph = endOfParagraph(nextPositionOf(endOfCurrentParagraph));
Position position = endOfNextParagraph.deepEquivalent();
const ComputedStyle* style = computedStyleOfEnclosingTextNode(position);
if (!style)
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | Source/core/editing/commands/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698