| Index: Source/web/WebViewImpl.cpp
|
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
|
| index f518fb0c0ad0802f15bf912fd2601e6d92333e90..f26de9a14852c0c662258a8585b7eb0ea65d2bc9 100644
|
| --- a/Source/web/WebViewImpl.cpp
|
| +++ b/Source/web/WebViewImpl.cpp
|
| @@ -535,17 +535,17 @@ void WebViewImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent& ev
|
| }
|
|
|
| // Dispatch the contextmenu event regardless of if the click was swallowed.
|
| -#if OS(WIN)
|
| - // On Windows, we handle it on mouse up, not down.
|
| -#elif OS(MACOSX)
|
| - if (event.button == WebMouseEvent::ButtonRight
|
| - || (event.button == WebMouseEvent::ButtonLeft
|
| - && event.modifiers & WebMouseEvent::ControlKey))
|
| - mouseContextMenu(event);
|
| + if (!page()->settings().showContextMenuOnMouseUp()) {
|
| +#if OS(MACOSX)
|
| + if (event.button == WebMouseEvent::ButtonRight
|
| + || (event.button == WebMouseEvent::ButtonLeft
|
| + && event.modifiers & WebMouseEvent::ControlKey))
|
| + mouseContextMenu(event);
|
| #else
|
| - if (event.button == WebMouseEvent::ButtonRight)
|
| - mouseContextMenu(event);
|
| + if (event.button == WebMouseEvent::ButtonRight)
|
| + mouseContextMenu(event);
|
| #endif
|
| + }
|
| }
|
|
|
| void WebViewImpl::mouseContextMenu(const WebMouseEvent& event)
|
| @@ -585,12 +585,12 @@ void WebViewImpl::handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent& even
|
| {
|
| PageWidgetEventHandler::handleMouseUp(mainFrame, event);
|
|
|
| -#if OS(WIN)
|
| - // Dispatch the contextmenu event regardless of if the click was swallowed.
|
| - // On Mac/Linux, we handle it on mouse down, not up.
|
| - if (event.button == WebMouseEvent::ButtonRight)
|
| - mouseContextMenu(event);
|
| -#endif
|
| + if (page()->settings().showContextMenuOnMouseUp()) {
|
| + // Dispatch the contextmenu event regardless of if the click was swallowed.
|
| + // On Mac/Linux, we handle it on mouse down, not up.
|
| + if (event.button == WebMouseEvent::ButtonRight)
|
| + mouseContextMenu(event);
|
| + }
|
| }
|
|
|
| bool WebViewImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent& event)
|
|
|