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

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

Issue 1602443006: Set the correct buttons for long press action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/mouse-event-buttons-attribute-expected.txt ('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 038faa35d7cfaa1d7f062fe119ffeda61e22efb2..013c87927d1d15a1b5407ca93c0824d6ffb71347 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -3034,9 +3034,11 @@ WebInputEventResult EventHandler::sendContextMenuEventForGesture(const GestureEv
if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp())
eventType = PlatformEvent::MouseReleased;
- else
- modifiers |= PlatformEvent::RightButtonDown;
+ // Always set right button down as we are sending mousedown event regardless
+ modifiers |= PlatformEvent::RightButtonDown;
+
+ // TODO(nzolghadr): crbug.com/579564 Maybe we should not send mouse down at all
mustaq 2016/01/20 18:10:26 Please consider using "TODO(crbug.com/579564)" sin
Navid Zolghadr 2016/01/20 18:35:52 Done.
PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1,
static_cast<PlatformEvent::Modifiers>(modifiers),
PlatformMouseEvent::FromTouch, WTF::monotonicallyIncreasingTime(), WebPointerProperties::PointerType::Mouse);
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/mouse-event-buttons-attribute-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698