| Index: third_party/WebKit/Source/core/editing/Editor.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| index 96b5a6583540f6e4ff7a31130bd3d47b32f41e7a..93f0e2a4535eaedd77b800c188d7a62d5ce01e3d 100644
|
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| @@ -875,13 +875,14 @@ void Editor::unappliedEditing(EditCommandComposition* cmd) {
|
| // VisibleSelections as starting and ending selections.
|
| frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| - VisibleSelection newSelection =
|
| + const VisibleSelection& newSelection =
|
| correctedVisibleSelection(cmd->startingSelection());
|
| - if (newSelection.start().document() == frame().document() &&
|
| - newSelection.end().document() == frame().document())
|
| + DCHECK(newSelection.isValidFor(*frame().document())) << newSelection;
|
| + if (!newSelection.isNone()) {
|
| changeSelectionAfterCommand(
|
| newSelection,
|
| FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle);
|
| + }
|
|
|
| m_lastEditCommand = nullptr;
|
| m_undoStack->registerRedoStep(cmd);
|
|
|