diff options
author | deepak.m1 <deepak.m1@samsung.com> | 2014-12-15 18:40:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-16 02:42:16 +0000 |
commit | 8a480e8350a8f10eaa3052a967c7998a8dadc1f8 (patch) | |
tree | 85e58840fc145424a7fb7c752099e27e13340863 /pdf | |
parent | d8a593bceaf0a4b38d06a8c13b948202d205f1b6 (diff) | |
download | chromium_src-8a480e8350a8f10eaa3052a967c7998a8dadc1f8.zip chromium_src-8a480e8350a8f10eaa3052a967c7998a8dadc1f8.tar.gz chromium_src-8a480e8350a8f10eaa3052a967c7998a8dadc1f8.tar.bz2 |
Selecting 'alt+left arrow' key in PDF does not move to previous url page. similarly 'alt+right arrow' key in PDF does not move to next url page.
Currently alt+arrow, ctrl+arrow,shift+arrow work like when
user select just arrow key, so with in the pdf file movement happen.
That is wrong.
It should be like:
1.Page should move up with in PDF when
-Selecting Shift+Spacebar.
-Selecting Pageup key.
-Selecting only Left Arrow Key.
2.Page should move down with in PDF when
-Selecting Spacebar.
-Selecting Pagedown key.
-Selecting only Right Arrow Key.
Changes added so that alt+ arrow key should have default behavior
that is moving to previous or next url.
BUG=75089
Review URL: https://codereview.chromium.org/802083002
Cr-Commit-Position: refs/heads/master@{#308511}
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/instance.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pdf/instance.cc b/pdf/instance.cc index a8a71e8..8dc69be 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; |