| 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 8db85385837d2b5d012c1d13cbed6a7897e8960a..147b10fa09c203c7d4978f25893ff29ef469de4d 100644
|
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| @@ -410,7 +410,7 @@ void Editor::deleteSelectionWithSmartDelete(
|
| DeleteMode deleteMode,
|
| InputEvent::InputType inputType,
|
| const Position& referenceMovePosition) {
|
| - if (frame().selection().isNone())
|
| + if (frame().selection().computeVisibleSelectionInDOMTreeDeprecated().isNone())
|
| return;
|
|
|
| const bool kMergeBlocksAfterDelete = true;
|
| @@ -605,7 +605,10 @@ void Editor::replaceSelectionWithFragment(DocumentFragment* fragment,
|
| bool matchStyle,
|
| InputEvent::InputType inputType) {
|
| DCHECK(!frame().document()->needsLayoutTreeUpdate());
|
| - if (frame().selection().isNone() ||
|
| + if (frame()
|
| + .selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .isNone() ||
|
| !frame()
|
| .selection()
|
| .computeVisibleSelectionInDOMTreeDeprecated()
|
| @@ -796,7 +799,11 @@ void Editor::applyStyle(StylePropertySet* style,
|
|
|
| void Editor::applyParagraphStyle(StylePropertySet* style,
|
| InputEvent::InputType inputType) {
|
| - if (frame().selection().isNone() || !style)
|
| + if (frame()
|
| + .selection()
|
| + .computeVisibleSelectionInDOMTreeDeprecated()
|
| + .isNone() ||
|
| + !style)
|
| return;
|
| DCHECK(frame().document());
|
| ApplyStyleCommand::create(*frame().document(), EditingStyle::create(style),
|
|
|