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 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3038 retVal = FocusTypeLeft; | 3038 retVal = FocusTypeLeft; |
3039 else if (keyIdentifier == Right) | 3039 else if (keyIdentifier == Right) |
3040 retVal = FocusTypeRight; | 3040 retVal = FocusTypeRight; |
3041 | 3041 |
3042 return retVal; | 3042 return retVal; |
3043 } | 3043 } |
3044 | 3044 |
3045 void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event) | 3045 void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event) |
3046 { | 3046 { |
3047 if (event->type() == EventTypeNames::keydown) { | 3047 if (event->type() == EventTypeNames::keydown) { |
| 3048 // Clear caret blinking suspended state to make sure that caret blinks |
| 3049 // when we type again after long pressing on an empty input field. |
| 3050 if (m_frame && m_frame->selection().isCaretBlinkingSuspended()) |
| 3051 m_frame->selection().setCaretBlinkingSuspended(false); |
| 3052 |
3048 m_frame->editor().handleKeyboardEvent(event); | 3053 m_frame->editor().handleKeyboardEvent(event); |
3049 if (event->defaultHandled()) | 3054 if (event->defaultHandled()) |
3050 return; | 3055 return; |
3051 if (event->keyIdentifier() == "U+0009") | 3056 if (event->keyIdentifier() == "U+0009") |
3052 defaultTabEventHandler(event); | 3057 defaultTabEventHandler(event); |
3053 else if (event->keyIdentifier() == "U+0008") | 3058 else if (event->keyIdentifier() == "U+0008") |
3054 defaultBackspaceEventHandler(event); | 3059 defaultBackspaceEventHandler(event); |
3055 else if (event->keyIdentifier() == "U+001B") | 3060 else if (event->keyIdentifier() == "U+001B") |
3056 defaultEscapeEventHandler(event); | 3061 defaultEscapeEventHandler(event); |
3057 else { | 3062 else { |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3820 unsigned EventHandler::accessKeyModifiers() | 3825 unsigned EventHandler::accessKeyModifiers() |
3821 { | 3826 { |
3822 #if OS(MACOSX) | 3827 #if OS(MACOSX) |
3823 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3828 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3824 #else | 3829 #else |
3825 return PlatformEvent::AltKey; | 3830 return PlatformEvent::AltKey; |
3826 #endif | 3831 #endif |
3827 } | 3832 } |
3828 | 3833 |
3829 } // namespace blink | 3834 } // namespace blink |
OLD | NEW |