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