Chromium Code Reviews| 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 74818e022a20ffb40cba3ae648826a4ca11c544f..07e3fc167a377e360d0d2e73b9571f722364a9ae 100644 |
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp |
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp |
| @@ -810,8 +810,14 @@ void Editor::reappliedEditing(EditCommandComposition* cmd) |
| dispatchEditableContentChangedEvents(cmd->startingRootEditableElement(), cmd->endingRootEditableElement()); |
| dispatchInputEventEditableContentChanged(cmd->startingRootEditableElement(), cmd->endingRootEditableElement(), InputEvent::InputType::Redo, emptyString(), InputEvent::EventIsComposing::NotComposing); |
| + // TODO(yosin): Since |dispatchEditableContentChangedEvents()| and |
| + // |dispatchInputEventEditableContentChanged()|, we would like to know |
| + // such case. Once we have a case, this |DCHECK()| should be replaced |
| + // with if-statement. |
| + DCHECK(frame().document()); |
| VisibleSelection newSelection(cmd->endingSelection()); |
| - changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle); |
| + if (newSelection.isValidFor(*frame().document())) |
|
Xiaocheng
2016/07/04 08:01:37
The fix looks fine to me, but for curiosity:
It s
yosin_UTC9
2016/07/04 09:57:07
I may not understand you question fully...
Anythi
|
| + changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle); |
| m_lastEditCommand = nullptr; |
| if (UndoStack* undoStack = this->undoStack()) |