| Index: third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| index 66f94dfea14d05f772c38f76d405c15bb8793101..86279dac0bb0cb1fca0356e595c5b1f709b331bb 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| @@ -89,7 +89,7 @@ void ApplyBlockElementCommand::doApply(EditingState* editingState) {
|
| createVisibleSelection(builder.build());
|
| if (newSelection.isNone())
|
| return;
|
| - setEndingSelection(newSelection);
|
| + setEndingSelection(builder.build());
|
| }
|
|
|
| VisibleSelection selection =
|
| @@ -116,12 +116,12 @@ void ApplyBlockElementCommand::doApply(EditingState* editingState) {
|
| VisiblePosition start(visiblePositionForIndex(startIndex, startScope));
|
| VisiblePosition end(visiblePositionForIndex(endIndex, endScope));
|
| if (start.isNotNull() && end.isNotNull()) {
|
| - setEndingSelection(createVisibleSelection(
|
| + setEndingSelection(
|
| SelectionInDOMTree::Builder()
|
| .collapse(start.toPositionWithAffinity())
|
| .extend(end.deepEquivalent())
|
| .setIsDirectional(endingSelection().isDirectional())
|
| - .build()));
|
| + .build());
|
| }
|
| }
|
| }
|
| @@ -148,12 +148,10 @@ void ApplyBlockElementCommand::formatSelection(
|
| appendNode(placeholder, blockquote, editingState);
|
| if (editingState->isAborted())
|
| return;
|
| - document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| - setEndingSelection(createVisibleSelection(
|
| - SelectionInDOMTree::Builder()
|
| - .collapse(Position::beforeNode(placeholder))
|
| - .setIsDirectional(endingSelection().isDirectional())
|
| - .build()));
|
| + setEndingSelection(SelectionInDOMTree::Builder()
|
| + .collapse(Position::beforeNode(placeholder))
|
| + .setIsDirectional(endingSelection().isDirectional())
|
| + .build());
|
| return;
|
| }
|
|
|
|
|