Chromium Code Reviews| Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
| index b370359ab3bf0239068c6a8ebe2af40b81af12f5..578ec4045547af2373c21a96415ddf682dbafe0b 100644 |
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
| @@ -1822,14 +1822,9 @@ WebInputEventResult EventHandler::SendContextMenuEventForKey( |
| Element* focused_element = |
| override_target_element ? override_target_element : doc->FocusedElement(); |
| FrameSelection& selection = frame_->Selection(); |
| - Position start = |
| - selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start(); |
| VisualViewport& visual_viewport = frame_->GetPage()->GetVisualViewport(); |
| - if (!override_target_element && start.AnchorNode() && !selection.IsHidden() && |
| - (selection.ComputeVisibleSelectionInDOMTreeDeprecated() |
| - .RootEditableElement() || |
| - selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) { |
| + if (!override_target_element && selection.SelectionHasFocus()) { |
|
yosin_UTC9
2017/05/16 09:45:22
It seems |start.AnchorNode() && !selection.IsHidde
hugoh_UTC2
2017/05/16 12:48:14
Right! Context menu should not use a hidden caret
|
| // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets |
| // needs to be audited. See http://crbug.com/590369 for more details. |
| doc->UpdateStyleAndLayoutIgnorePendingStylesheets(); |