Chromium Code Reviews| Index: pdf/instance.cc |
| diff --git a/pdf/instance.cc b/pdf/instance.cc |
| index a8a71e8a89889b80274e4055c8dac427e9013520..5b486b9fe42c4e235764093d41caedf8eaf5f3bc 100644 |
| --- a/pdf/instance.cc |
| +++ b/pdf/instance.cc |
| @@ -532,8 +532,10 @@ 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 is_modifiers = keyboard_event.GetModifiers() != 0; |
|
raymes
2014/12/15 05:51:00
could you rename is_modifiers to has_modifiers?
|
| + bool page_down = |
| + no_h_scrollbar && !is_modifiers && key_code == ui::VKEY_RIGHT; |
| + bool page_up = no_h_scrollbar && !is_modifiers && key_code == ui::VKEY_LEFT; |
| if (zoom_mode_ == ZOOM_FIT_TO_PAGE) { |
| bool has_shift = |
| keyboard_event.GetModifiers() & PP_INPUTEVENT_MODIFIER_SHIFTKEY; |