Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2869713003: Make context menu aware of hidden selection (Closed)
Patch Set: Add test as NeverFixTests for Mac Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/contextmenu-follows-focus.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cf17e1df8c3bfc2248839b3f49db5c00eb7de6c4..b370359ab3bf0239068c6a8ebe2af40b81af12f5 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1826,7 +1826,7 @@ WebInputEventResult EventHandler::SendContextMenuEventForKey(
selection.ComputeVisibleSelectionInDOMTreeDeprecated().Start();
VisualViewport& visual_viewport = frame_->GetPage()->GetVisualViewport();
- if (!override_target_element && start.AnchorNode() &&
+ if (!override_target_element && start.AnchorNode() && !selection.IsHidden() &&
(selection.ComputeVisibleSelectionInDOMTreeDeprecated()
.RootEditableElement() ||
selection.ComputeVisibleSelectionInDOMTreeDeprecated().IsRange())) {
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/contextmenu-follows-focus.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698