| Index: webkit/glue/webview_impl.cc
|
| diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
|
| index e40d27bd6f574827d7c5691bb37caa58ddbe6cec..e7cd81e09e01ff457b9f66b72d887772f48ea6ca 100644
|
| --- a/webkit/glue/webview_impl.cc
|
| +++ b/webkit/glue/webview_impl.cc
|
| @@ -430,9 +430,9 @@ void WebViewImpl::MouseLeave(const WebMouseEvent& event) {
|
| MakePlatformMouseEvent(main_frame()->frameview(), event));
|
| }
|
|
|
| -void WebViewImpl::MouseDown(const WebMouseEvent& event) {
|
| +bool WebViewImpl::MouseDown(const WebMouseEvent& event) {
|
| if (!main_frame() || !main_frame()->frameview())
|
| - return;
|
| + return false;
|
|
|
| last_mouse_down_point_ = gfx::Point(event.x, event.y);
|
|
|
| @@ -456,7 +456,7 @@ void WebViewImpl::MouseDown(const WebMouseEvent& event) {
|
| }
|
| }
|
|
|
| - main_frame()->frame()->eventHandler()->handleMousePressEvent(
|
| + bool processed = main_frame()->frame()->eventHandler()->handleMousePressEvent(
|
| MakePlatformMouseEvent(main_frame()->frameview(), event));
|
|
|
| if (clicked_node.get() && clicked_node == GetFocusedNode()) {
|
| @@ -472,11 +472,16 @@ void WebViewImpl::MouseDown(const WebMouseEvent& event) {
|
| (event.button == WebMouseEvent::ButtonLeft &&
|
| event.modifiers & WebMouseEvent::ControlKey)) {
|
| MouseContextMenu(event);
|
| + return true;
|
| }
|
| #elif defined(OS_LINUX)
|
| - if (event.button == WebMouseEvent::ButtonRight)
|
| + if (event.button == WebMouseEvent::ButtonRight) {
|
| MouseContextMenu(event);
|
| + return true;
|
| + }
|
| #endif
|
| +
|
| + return processed;
|
| }
|
|
|
| void WebViewImpl::MouseContextMenu(const WebMouseEvent& event) {
|
| @@ -506,19 +511,22 @@ void WebViewImpl::MouseContextMenu(const WebMouseEvent& event) {
|
| // implementation...
|
| }
|
|
|
| -void WebViewImpl::MouseUp(const WebMouseEvent& event) {
|
| +bool WebViewImpl::MouseUp(const WebMouseEvent& event) {
|
| if (!main_frame() || !main_frame()->frameview())
|
| - return;
|
| + return false;
|
|
|
| MouseCaptureLost();
|
| - main_frame()->frame()->eventHandler()->handleMouseReleaseEvent(
|
| - MakePlatformMouseEvent(main_frame()->frameview(), event));
|
| + bool processed =
|
| + main_frame()->frame()->eventHandler()->handleMouseReleaseEvent(
|
| + MakePlatformMouseEvent(main_frame()->frameview(), event));
|
|
|
| #if defined(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)
|
| + if (event.button == WebMouseEvent::ButtonRight) {
|
| MouseContextMenu(event);
|
| + return true;
|
| + }
|
| #endif
|
|
|
| #if defined(OS_LINUX)
|
| @@ -540,14 +548,17 @@ void WebViewImpl::MouseUp(const WebMouseEvent& event) {
|
| if (event.button == WebMouseEvent::ButtonMiddle) {
|
| Frame* focused = GetFocusedWebCoreFrame();
|
| if (!focused)
|
| - return;
|
| + return processed;
|
| Editor* editor = focused->editor();
|
| if (!editor || !editor->canEdit())
|
| - return;
|
| + return processed;
|
|
|
| delegate_->PasteFromSelectionClipboard();
|
| + return true;
|
| }
|
| #endif
|
| +
|
| + return processed;
|
| }
|
|
|
| void WebViewImpl::MouseWheel(const WebMouseWheelEvent& event) {
|
| @@ -1059,12 +1070,10 @@ bool WebViewImpl::HandleInputEvent(const WebInputEvent* input_event) {
|
| break;
|
|
|
| case WebInputEvent::MouseDown:
|
| - MouseDown(*static_cast<const WebMouseEvent*>(input_event));
|
| - break;
|
| + return MouseDown(*static_cast<const WebMouseEvent*>(input_event));
|
|
|
| case WebInputEvent::MouseUp:
|
| - MouseUp(*static_cast<const WebMouseEvent*>(input_event));
|
| - break;
|
| + return MouseUp(*static_cast<const WebMouseEvent*>(input_event));
|
|
|
| case WebInputEvent::RawKeyDown:
|
| case WebInputEvent::KeyDown:
|
|
|