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

Unified Diff: webkit/glue/webview_impl.cc

Issue 173414: On a middle click, check if the mouse is over a scrollbar before pasting the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webview_impl.cc
===================================================================
--- webkit/glue/webview_impl.cc (revision 24335)
+++ webkit/glue/webview_impl.cc (working copy)
@@ -549,7 +549,11 @@
// 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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698