| Index: third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| index 799b67dc1bdd03601102179e1ef1c88ede986ba7..d40ee973811632974e06d3b6aef33227e8c20961 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
|
| @@ -216,7 +216,10 @@ void InsertListCommand::doApply(EditingState* editingState) {
|
| // and use it as the end of the new selection.
|
| if (!startOfLastParagraph.isConnected())
|
| return;
|
| - setEndingSelection(startOfCurrentParagraph);
|
| + setEndingSelection(
|
| + SelectionInDOMTree::Builder()
|
| + .collapse(startOfCurrentParagraph.deepEquivalent())
|
| + .build());
|
|
|
| // Save and restore visibleEndOfSelection and startOfLastParagraph when
|
| // necessary since moveParagraph and movePragraphWithClones can remove
|
| @@ -253,7 +256,9 @@ void InsertListCommand::doApply(EditingState* editingState) {
|
| startOfCurrentParagraph =
|
| startOfNextParagraph(endingSelection().visibleStart());
|
| }
|
| - setEndingSelection(visibleEndOfSelection);
|
| + setEndingSelection(SelectionInDOMTree::Builder()
|
| + .collapse(visibleEndOfSelection.deepEquivalent())
|
| + .build());
|
| }
|
| doApplyForSingleParagraph(forceListCreation, listTag, *currentSelection,
|
| editingState);
|
| @@ -411,8 +416,9 @@ bool InsertListCommand::doApplyForSingleParagraph(
|
| currentSelection.setEnd(newList, Position::lastOffsetInNode(newList),
|
| IGNORE_EXCEPTION);
|
|
|
| - document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| - setEndingSelection(VisiblePosition::firstPositionInNode(newList));
|
| + setEndingSelection(SelectionInDOMTree::Builder()
|
| + .collapse(Position::firstPositionInNode(newList))
|
| + .build());
|
|
|
| return true;
|
| }
|
|
|