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

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

Issue 1986783002: Text selected with double-tap should not cause vibration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added description of return value of showContextMenu Created 4 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 9f367910474810e788cfd9256eccf9d8b759566f..2c4704694529613510bcb9f02355abb13ad8e06a 100644
--- a/third_party/WebKit/Source/core/page/ContextMenuController.cpp
+++ b/third_party/WebKit/Source/core/page/ContextMenuController.cpp
@@ -173,8 +173,13 @@ PassOwnPtr<ContextMenu> ContextMenuController::createContextMenu(LocalFrame* fra
void ContextMenuController::showContextMenu(Event* event)
{
- m_client->showContextMenu(m_contextMenu.get());
- if (event)
+ bool fromTouch = false;
+ if (event && event->isMouseEvent()) {
+ MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
+ fromTouch = mouseEvent->fromTouch();
+ }
+
+ if (m_client->showContextMenu(m_contextMenu.get(), fromTouch) && event)
event->setDefaultHandled();
}
« no previous file with comments | « third_party/WebKit/Source/core/page/ContextMenuClient.h ('k') | third_party/WebKit/Source/web/ContextMenuClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698