OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 Element* elem = m_frame->document()->getElementByAccessKey(key.lower()); | 3144 Element* elem = m_frame->document()->getElementByAccessKey(key.lower()); |
3145 if (!elem) | 3145 if (!elem) |
3146 return false; | 3146 return false; |
3147 elem->accessKeyAction(false); | 3147 elem->accessKeyAction(false); |
3148 return true; | 3148 return true; |
3149 } | 3149 } |
3150 | 3150 |
3151 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) | 3151 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) |
3152 { | 3152 { |
3153 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); | 3153 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); |
3154 m_frame->chromeClient().setToolTip(String(), LTR); | 3154 m_frame->chromeClient().clearToolTip(); |
3155 | 3155 |
3156 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) | 3156 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) |
3157 capsLockStateMayHaveChanged(); | 3157 capsLockStateMayHaveChanged(); |
3158 | 3158 |
3159 #if OS(WIN) | 3159 #if OS(WIN) |
3160 if (panScrollInProgress()) { | 3160 if (panScrollInProgress()) { |
3161 // If a key is pressed while the panScroll is in progress then we want t
o stop | 3161 // If a key is pressed while the panScroll is in progress then we want t
o stop |
3162 if (initialKeyEvent.type() == PlatformEvent::KeyDown || initialKeyEvent.
type() == PlatformEvent::RawKeyDown) | 3162 if (initialKeyEvent.type() == PlatformEvent::KeyDown || initialKeyEvent.
type() == PlatformEvent::RawKeyDown) |
3163 stopAutoscroll(); | 3163 stopAutoscroll(); |
3164 | 3164 |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4088 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
4089 { | 4089 { |
4090 #if OS(MACOSX) | 4090 #if OS(MACOSX) |
4091 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4091 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
4092 #else | 4092 #else |
4093 return PlatformEvent::AltKey; | 4093 return PlatformEvent::AltKey; |
4094 #endif | 4094 #endif |
4095 } | 4095 } |
4096 | 4096 |
4097 } // namespace blink | 4097 } // namespace blink |
OLD | NEW |