summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 16:54:05 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 16:54:05 +0000
commit34976af3e937d0a8e61657e1ad6bf734b4edf97e (patch)
treed634cc1260cf1b32a5fbf9f4c50f41cd8d7beb4a /webkit
parent5f5314397438f59cb923beffe74c74c086636133 (diff)
downloadchromium_src-34976af3e937d0a8e61657e1ad6bf734b4edf97e.zip
chromium_src-34976af3e937d0a8e61657e1ad6bf734b4edf97e.tar.gz
chromium_src-34976af3e937d0a8e61657e1ad6bf734b4edf97e.tar.bz2
On a middle click, check if the mouse is over a scrollbar before pasting the selection.
BUG=16400 TEST=See bug description Review URL: http://codereview.chromium.org/173414 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webview_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index abae891..2c6069e 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -549,7 +549,11 @@ void WebViewImpl::MouseUp(const WebMouseEvent& event) {
// handleMouseReleaseEvent() earlier in this function
if (event.button == WebMouseEvent::ButtonMiddle) {
Frame* focused = GetFocusedWebCoreFrame();
- if (focused) {
+ IntPoint click_point(last_mouse_down_point_.x, last_mouse_down_point_.y);
+ HitTestResult hit_test_result =
+ focused->eventHandler()->hitTestResultAtPoint(click_point, false, false,
+ ShouldHitTestScrollbars);
+ if (!hit_test_result.scrollbar() && focused) {
Editor* editor = focused->editor();
if (editor && editor->canEdit())
delegate_->PasteFromSelectionClipboard();