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

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

Issue 1302353002: Get rid of redundant member function PositionAlgorithm<Strategy>::{upstream,downstream} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-22T04:51:20 Rebase 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 50ae87704242539c32db1ebc6a453e5b6ce7e9c7..6bdfebbca519c3107222fe8ca78fdea1abf3a7d3 100644
--- a/Source/core/editing/commands/InsertListCommand.cpp
+++ b/Source/core/editing/commands/InsertListCommand.cpp
@@ -395,7 +395,7 @@ PassRefPtrWillBeRawPtr<HTMLElement> InsertListCommand::listifyParagraph(const Vi
// Try to avoid inserting it somewhere where it will be surrounded by
// inline ancestors of start, since it is easier for editing to produce
// clean markup when inline elements are pushed down as far as possible.
- Position insertionPos(start.deepEquivalent().upstream());
+ Position insertionPos(mostBackwardCaretPosition(start.deepEquivalent()));
// Also avoid the containing list item.
Node* listChild = enclosingListChild(insertionPos.anchorNode());
if (isHTMLLIElement(listChild))

Powered by Google App Engine
This is Rietveld 408576698