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

Unified Diff: pdf/out_of_process_instance.cc

Issue 976123002: Allow middle-click scrolling to work for PDFs and print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index ef83cd99ba2d002695b0ef110025abe0742489a8..b375cb37980620a1969d466601f22278d5d6601f 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -550,8 +550,10 @@ bool OutOfProcessInstance::HandleInputEvent(
if (engine_->HandleEvent(offset_event))
return true;
- // TODO(raymes): Implement this scroll behavior in JS:
- // When click+dragging, scroll the document correctly.
+ // Middle click is used for scrolling and is handled by the container page.
+ pp::MouseInputEvent mouse_event(event_device_res);
+ if (mouse_event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE)
Sam McNally 2015/03/05 02:05:06 What if the event isn't a mouse event?
raymes 2015/03/05 23:06:56 Oops, done.
+ return false;
// Return true for unhandled clicks so the plugin takes focus.
return (event.GetType() == PP_INPUTEVENT_TYPE_MOUSEDOWN);
« 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