Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| index 478fcb4edd8914ed027acc48bf0d2012a08651b9..041629aa382518fa40f0e4c05c257cd528b1b665 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp |
| @@ -2114,13 +2114,12 @@ static bool enabledSelectAll(LocalFrame& frame, Event*, EditorCommandSource) { |
| frame.selection().computeVisibleSelectionInDOMTree(); |
| if (selection.isNone()) |
| return true; |
| - if (TextControlElement* textControl = |
| - enclosingTextControl(selection.start())) { |
| - if (textControl->innerEditorValue().isEmpty()) |
| + if (selection.isContentEditable()) { |
| + Node* root = highestEditableRoot(selection.start()); |
|
yosin_UTC9
2017/04/06 08:27:27
For safety, we would like to do null check for |ro
amaralp
2017/04/06 21:51:21
Done.
|
| + if (!root->hasChildren()) |
| return false; |
| // TODO(amaralp): Return false if already fully selected. |
| } |
| - // TODO(amaralp): Support contentEditable. |
| // TODO(amaralp): Address user-select handling. |
| return true; |
| } |