| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index 841efd2396de7e5228d4b4ba9983e4debb4b1d07..519bab257a370acc8e2a2d846e5fa1387e5adf94 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -2827,15 +2827,15 @@ bool EventHandler::sendContextMenuEventForKey()
|
|
|
| bool EventHandler::sendContextMenuEventForGesture(const GestureEventWithHitTestResults& targetedEvent)
|
| {
|
| -#if OS(WIN)
|
| - PlatformEvent::Type eventType = PlatformEvent::MouseReleased;
|
| -#else
|
| + unsigned modifiers = targetedEvent.event().modifiers();
|
| PlatformEvent::Type eventType = PlatformEvent::MousePressed;
|
| -#endif
|
| + if (m_frame->settings()->showContextMenuOnMouseUp())
|
| + eventType = PlatformEvent::MouseReleased;
|
| + else
|
| + modifiers |= PlatformEvent::RightButtonDown;
|
|
|
| - unsigned modifiers = targetedEvent.event().modifiers();
|
| PlatformMouseEvent mouseEvent(targetedEvent.event().position(), targetedEvent.event().globalPosition(), RightButton, eventType, 1,
|
| - static_cast<PlatformEvent::Modifiers>(modifiers | PlatformEvent::RightButtonDown),
|
| + static_cast<PlatformEvent::Modifiers>(modifiers),
|
| PlatformMouseEvent::FromTouch, WTF::currentTime());
|
| // To simulate right-click behavior, we send a right mouse down and then
|
| // context menu event.
|
|
|