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 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 return (keyCode >= VK_BACK && keyCode <= VK_CAPITAL) | 3053 return (keyCode >= VK_BACK && keyCode <= VK_CAPITAL) |
3054 || (keyCode >= VK_SPACE && keyCode <= VK_DELETE) | 3054 || (keyCode >= VK_SPACE && keyCode <= VK_DELETE) |
3055 || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS) | 3055 || (keyCode >= VK_OEM_1 && keyCode <= VK_OEM_PLUS) |
3056 || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8); | 3056 || (keyCode >= VK_MULTIPLY && keyCode <= VK_OEM_8); |
3057 } | 3057 } |
3058 | 3058 |
3059 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) | 3059 bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) |
3060 { | 3060 { |
3061 RefPtr<FrameView> protector(m_frame->view()); | 3061 RefPtr<FrameView> protector(m_frame->view()); |
3062 | 3062 |
3063 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(m_frame->document())) { | 3063 ASSERT(m_frame->document()); |
| 3064 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(*m_frame->document())) { |
3064 if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(f
ullscreen, initialKeyEvent)) | 3065 if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(f
ullscreen, initialKeyEvent)) |
3065 return false; | 3066 return false; |
3066 } | 3067 } |
3067 | 3068 |
3068 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) | 3069 if (initialKeyEvent.windowsVirtualKeyCode() == VK_CAPITAL) |
3069 capsLockStateMayHaveChanged(); | 3070 capsLockStateMayHaveChanged(); |
3070 | 3071 |
3071 #if OS(WIN) | 3072 #if OS(WIN) |
3072 if (panScrollInProgress()) { | 3073 if (panScrollInProgress()) { |
3073 // If a key is pressed while the panScroll is in progress then we want t
o stop | 3074 // If a key is pressed while the panScroll is in progress then we want t
o stop |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4011 unsigned EventHandler::accessKeyModifiers() | 4012 unsigned EventHandler::accessKeyModifiers() |
4012 { | 4013 { |
4013 #if OS(MACOSX) | 4014 #if OS(MACOSX) |
4014 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4015 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4015 #else | 4016 #else |
4016 return PlatformEvent::AltKey; | 4017 return PlatformEvent::AltKey; |
4017 #endif | 4018 #endif |
4018 } | 4019 } |
4019 | 4020 |
4020 } // namespace WebCore | 4021 } // namespace WebCore |
OLD | NEW |