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

Unified Diff: third_party/WebKit/Source/core/page/ContextMenuController.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix tests 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
Index: third_party/WebKit/Source/core/page/ContextMenuController.cpp
diff --git a/third_party/WebKit/Source/core/page/ContextMenuController.cpp b/third_party/WebKit/Source/core/page/ContextMenuController.cpp
index 4372fbbf37747f56d40d489bc83740baf80889b7..8293676e16981a7165b8236d1aac2c38b9e35239 100644
--- a/third_party/WebKit/Source/core/page/ContextMenuController.cpp
+++ b/third_party/WebKit/Source/core/page/ContextMenuController.cpp
@@ -162,13 +162,15 @@ std::unique_ptr<ContextMenu> ContextMenuController::CreateContextMenu(
}
void ContextMenuController::ShowContextMenu(Event* event) {
- bool from_touch = false;
+ MouseEvent::SyntheticEventType synthetic_event_type =
+ MouseEvent::kRealOrIndistinguishable;
if (event && event->IsMouseEvent()) {
MouseEvent* mouse_event = static_cast<MouseEvent*>(event);
- from_touch = mouse_event->FromTouch();
+ synthetic_event_type = mouse_event->GetSyntheticEventType();
}
- if (client_->ShowContextMenu(context_menu_.get(), from_touch) && event)
+ if (client_->ShowContextMenu(context_menu_.get(), synthetic_event_type) &&
+ event)
event->SetDefaultHandled();
}

Powered by Google App Engine
This is Rietveld 408576698