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

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: Removed the platform macros 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..4d3bd8174e69d10c5646fc8d9a41db96c0312d48 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->isMouseEvent()) {
+ MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
+ fromTouch = mouseEvent->fromTouch();
+ }
+
+ if (m_client->showContextMenu(m_contextMenu.get(), fromTouch) && event)
aelias_OOO_until_Jul13 2016/05/19 02:25:21 This "&& event" is too late because there would al
amaralp 2016/05/19 18:21:09 Done.
event->setDefaultHandled();
}

Powered by Google App Engine
This is Rietveld 408576698