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

Unified Diff: pdf/instance.cc

Issue 802083002: Selecting 'alt+left arrow' key in PDF does not move to previous url page. similarly 'alt+right arro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/instance.cc
diff --git a/pdf/instance.cc b/pdf/instance.cc
index a8a71e8a89889b80274e4055c8dac427e9013520..8dc69be8104fb7bd14b96075f45761a991fd91c1 100644
--- a/pdf/instance.cc
+++ b/pdf/instance.cc
@@ -532,8 +532,11 @@ bool Instance::HandleInputEvent(const pp::InputEvent& event) {
pp::KeyboardInputEvent keyboard_event(event);
bool no_h_scrollbar = !h_scrollbar_.get();
uint32_t key_code = keyboard_event.GetKeyCode();
- bool page_down = no_h_scrollbar && key_code == ui::VKEY_RIGHT;
- bool page_up = no_h_scrollbar && key_code == ui::VKEY_LEFT;
+ bool has_modifiers = keyboard_event.GetModifiers() != 0;
+ bool page_down =
+ no_h_scrollbar && !has_modifiers && key_code == ui::VKEY_RIGHT;
+ bool page_up =
+ no_h_scrollbar && !has_modifiers && key_code == ui::VKEY_LEFT;
if (zoom_mode_ == ZOOM_FIT_TO_PAGE) {
bool has_shift =
keyboard_event.GetModifiers() & PP_INPUTEVENT_MODIFIER_SHIFTKEY;
« 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