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

Unified Diff: Source/core/editing/commands/InsertListCommand.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
Index: Source/core/editing/commands/InsertListCommand.cpp
diff --git a/Source/core/editing/commands/InsertListCommand.cpp b/Source/core/editing/commands/InsertListCommand.cpp
index 4a08169c43797b7a0312f519ab584a28dbb5630f..3785932cf0cdd469071a37eb01874c5cbd5c9bb6 100644
--- a/Source/core/editing/commands/InsertListCommand.cpp
+++ b/Source/core/editing/commands/InsertListCommand.cpp
@@ -294,7 +294,7 @@ void InsertListCommand::unlistifyParagraph(const VisiblePosition& originalStart,
// A paragraph is visually a list item minus a list marker. The paragraph will be moved.
start = startOfParagraph(originalStart, CanSkipOverEditingBoundary);
end = endOfParagraph(start, CanSkipOverEditingBoundary);
- nextListChild = enclosingListChild(end.next().deepEquivalent().anchorNode(), listElement);
+ nextListChild = enclosingListChild(nextPositionOf(end).deepEquivalent().anchorNode(), listElement);
ASSERT(nextListChild != listChildNode);
previousListChild = enclosingListChild(previousPositionOf(start).deepEquivalent().anchorNode(), listElement);
ASSERT(previousListChild != listChildNode);
@@ -370,7 +370,7 @@ PassRefPtrWillBeRawPtr<HTMLElement> InsertListCommand::listifyParagraph(const Vi
// Place list item into adjoining lists.
HTMLElement* previousList = adjacentEnclosingList(start, previousPositionOf(start, CannotCrossEditingBoundary), listTag);
- HTMLElement* nextList = adjacentEnclosingList(start, end.next(CannotCrossEditingBoundary), listTag);
+ HTMLElement* nextList = adjacentEnclosingList(start, nextPositionOf(end, CannotCrossEditingBoundary), listTag);
RefPtrWillBeRawPtr<HTMLElement> listElement = nullptr;
if (previousList) {
appendNode(listItemElement, previousList);
« no previous file with comments | « Source/core/editing/commands/IndentOutdentCommand.cpp ('k') | Source/core/editing/commands/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698