Index: components/pdf_viewer/pdf_viewer.cc |
diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc |
index 5a1dcf268ec37c54073d9b6c78dac8e68c2c3203..270ea40ae750324014d6a587ee6c4d35c3de2384 100644 |
--- a/components/pdf_viewer/pdf_viewer.cc |
+++ b/components/pdf_viewer/pdf_viewer.cc |
@@ -380,17 +380,20 @@ class PDFView : public mojo::ApplicationDelegate, |
return; |
} |
+ // TODO(rjkroege): Make panning and scrolling more performant and |
+ // responsive to gesture events. |
if ((event->key_data && |
event->key_data->windows_key_code == mojo::KEYBOARD_CODE_DOWN) || |
- (event->pointer_data && event->pointer_data->vertical_wheel < 0)) { |
+ (event->wheel_data && event->wheel_data && |
+ event->wheel_data->delta_y < 0)) { |
if (current_page_ < (page_count_ - 1)) { |
current_page_++; |
DrawBitmap(embedder_for_roots_[view]); |
} |
} else if ((event->key_data && |
event->key_data->windows_key_code == mojo::KEYBOARD_CODE_UP) || |
- (event->pointer_data && |
- event->pointer_data->vertical_wheel > 0)) { |
+ (event->pointer_data && event->wheel_data && |
+ event->wheel_data->delta_y > 0)) { |
if (current_page_ > 0) { |
current_page_--; |
DrawBitmap(embedder_for_roots_[view]); |