Chromium Code Reviews| 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); |