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

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

Issue 2841093002: Algorithm for deciding if a frame's selection should be hidden (Closed)
Patch Set: More robust logic (no need to modify LayoutTests?) and new C++ unit tests Created 3 years, 8 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
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 e8eb453d76839e49a7a01538684714985bd0bef8..4664abec80bcbd229fd60e0babfc8a6d29dcd9b5 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1818,7 +1818,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())) {

Powered by Google App Engine
This is Rietveld 408576698