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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc

Issue 235039: Fix conflicts between accelerator keys and HTML DOM accesskeys.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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
Index: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
===================================================================
--- chrome/browser/views/tab_contents/tab_contents_view_gtk.cc (revision 29767)
+++ chrome/browser/views/tab_contents/tab_contents_view_gtk.cc (working copy)
@@ -283,19 +283,19 @@
reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD);
}
-void TabContentsViewGtk::HandleKeyboardEvent(
+bool TabContentsViewGtk::HandleKeyboardEvent(
const NativeWebKeyboardEvent& event) {
// The renderer returned a keyboard event it did not process. This may be
// a keyboard shortcut that we have to process.
if (event.type != WebInputEvent::RawKeyDown)
- return;
+ return false;
views::FocusManager* focus_manager =
views::FocusManager::GetFocusManagerForNativeView(GetNativeView());
// We may not have a focus_manager at this point (if the tab has been switched
// by the time this message returned).
if (!focus_manager)
- return;
+ return false;
bool shift_pressed = (event.modifiers & WebInputEvent::ShiftKey) ==
WebInputEvent::ShiftKey;
@@ -304,7 +304,7 @@
bool alt_pressed = (event.modifiers & WebInputEvent::AltKey) ==
WebInputEvent::AltKey;
- focus_manager->ProcessAccelerator(
+ return focus_manager->ProcessAccelerator(
views::Accelerator(static_cast<base::KeyboardCode>(event.windowsKeyCode),
shift_pressed, ctrl_pressed, alt_pressed));
// DANGER: |this| could be deleted now!

Powered by Google App Engine
This is Rietveld 408576698