| 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 d63e9288696412da24b36cff1814912045b76ce3..7d1dbfd4ab2cac925fbe52931ea9186a49e51ebf 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
|
| @@ -85,8 +85,7 @@ void ApplyBlockElementCommand::doApply(EditingState* editingState) {
|
| if (newEnd.isNotNull())
|
| builder.extend(newEnd);
|
| builder.setIsDirectional(endingSelection().isDirectional());
|
| - const VisibleSelection newSelection =
|
| - createVisibleSelection(builder.build());
|
| + const SelectionInDOMTree& newSelection = builder.build();
|
| if (newSelection.isNone())
|
| return;
|
| setEndingSelection(newSelection);
|
| @@ -116,12 +115,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());
|
| }
|
| }
|
| }
|
| @@ -149,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;
|
| }
|
|
|
|
|