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

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

Issue 2446333002: Set right button for mousedown/contextmenu of long press gesture (Closed)
Patch Set: Add the bug ref for focus Created 4 years, 1 month 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/GestureManager.cpp
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp
index 4171e89cb9197b23cbf1b6600eb877ce0052d7e0..aee39231a75840aa44e5f9fd996cb58b3a265517 100644
--- a/third_party/WebKit/Source/core/input/GestureManager.cpp
+++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -363,10 +363,13 @@ WebInputEventResult GestureManager::sendContextMenuEventForGesture(
PlatformEvent::EventType eventType = PlatformEvent::MousePressed;
if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp())
eventType = PlatformEvent::MouseReleased;
+ // TODO(crbug.com/661200): We don't want a mousedown here but text area
+ // cursor doesn't appear on long-tap focus w/o the mousedown.
PlatformMouseEvent mouseEvent(
targetedEvent.event().position(), targetedEvent.event().globalPosition(),
- WebPointerProperties::Button::NoButton, eventType, /* clickCount */ 0,
- static_cast<PlatformEvent::Modifiers>(modifiers),
+ WebPointerProperties::Button::Right, eventType, /* clickCount */ 1,
+ static_cast<PlatformEvent::Modifiers>(
+ modifiers | PlatformEvent::Modifiers::RightButtonDown),
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