| 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 3132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3143 keyPressEvent.disambiguateKeyDownEvent(PlatformEvent::Char); | 3143 keyPressEvent.disambiguateKeyDownEvent(PlatformEvent::Char); |
| 3144 if (keyPressEvent.text().isEmpty()) | 3144 if (keyPressEvent.text().isEmpty()) |
| 3145 return WebInputEventResult::NotHandled; | 3145 return WebInputEventResult::NotHandled; |
| 3146 RefPtrWillBeRawPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressE
vent, m_frame->document()->domWindow()); | 3146 RefPtrWillBeRawPtr<KeyboardEvent> keypress = KeyboardEvent::create(keyPressE
vent, m_frame->document()->domWindow()); |
| 3147 keypress->setTarget(node); | 3147 keypress->setTarget(node); |
| 3148 return toWebInputEventResult(node->dispatchEvent(keypress)); | 3148 return toWebInputEventResult(node->dispatchEvent(keypress)); |
| 3149 } | 3149 } |
| 3150 | 3150 |
| 3151 static WebFocusType focusDirectionForKey(const AtomicString& keyIdentifier) | 3151 static WebFocusType focusDirectionForKey(const AtomicString& keyIdentifier) |
| 3152 { | 3152 { |
| 3153 DEFINE_STATIC_LOCAL(AtomicString, Down, ("Down", AtomicString::ConstructFrom
Literal)); | 3153 DEFINE_STATIC_LOCAL(AtomicString, Down, ("Down")); |
| 3154 DEFINE_STATIC_LOCAL(AtomicString, Up, ("Up", AtomicString::ConstructFromLite
ral)); | 3154 DEFINE_STATIC_LOCAL(AtomicString, Up, ("Up")); |
| 3155 DEFINE_STATIC_LOCAL(AtomicString, Left, ("Left", AtomicString::ConstructFrom
Literal)); | 3155 DEFINE_STATIC_LOCAL(AtomicString, Left, ("Left")); |
| 3156 DEFINE_STATIC_LOCAL(AtomicString, Right, ("Right", AtomicString::ConstructFr
omLiteral)); | 3156 DEFINE_STATIC_LOCAL(AtomicString, Right, ("Right")); |
| 3157 | 3157 |
| 3158 WebFocusType retVal = WebFocusTypeNone; | 3158 WebFocusType retVal = WebFocusTypeNone; |
| 3159 | 3159 |
| 3160 if (keyIdentifier == Down) | 3160 if (keyIdentifier == Down) |
| 3161 retVal = WebFocusTypeDown; | 3161 retVal = WebFocusTypeDown; |
| 3162 else if (keyIdentifier == Up) | 3162 else if (keyIdentifier == Up) |
| 3163 retVal = WebFocusTypeUp; | 3163 retVal = WebFocusTypeUp; |
| 3164 else if (keyIdentifier == Left) | 3164 else if (keyIdentifier == Left) |
| 3165 retVal = WebFocusTypeLeft; | 3165 retVal = WebFocusTypeLeft; |
| 3166 else if (keyIdentifier == Right) | 3166 else if (keyIdentifier == Right) |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3976 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3976 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3977 { | 3977 { |
| 3978 #if OS(MACOSX) | 3978 #if OS(MACOSX) |
| 3979 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 3979 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
| 3980 #else | 3980 #else |
| 3981 return PlatformEvent::AltKey; | 3981 return PlatformEvent::AltKey; |
| 3982 #endif | 3982 #endif |
| 3983 } | 3983 } |
| 3984 | 3984 |
| 3985 } // namespace blink | 3985 } // namespace blink |
| OLD | NEW |