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

Unified Diff: components/pdf_viewer/pdf_viewer.cc

Issue 1313353010: Overhaul Mandoline event transport code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed gn check Created 5 years, 3 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 | « components/mus/view_tree_unittest.cc ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « components/mus/view_tree_unittest.cc ('k') | mojo/converters/input_events/input_events_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698