OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 didBlur(); | 58 didBlur(); |
59 | 59 |
60 if (event->type() == EventTypeNames::focus) | 60 if (event->type() == EventTypeNames::focus) |
61 didFocus(); | 61 didFocus(); |
62 | 62 |
63 if (event->isKeyboardEvent()) { | 63 if (event->isKeyboardEvent()) { |
64 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); | 64 KeyboardEvent* keyboardEvent = toKeyboardEvent(event); |
65 if (!isDisabled() && !isFieldOwnerDisabled() && !isFieldOwnerReadOnly()) { | 65 if (!isDisabled() && !isFieldOwnerDisabled() && !isFieldOwnerReadOnly()) { |
66 handleKeyboardEvent(keyboardEvent); | 66 handleKeyboardEvent(keyboardEvent); |
67 if (keyboardEvent->defaultHandled()) | 67 if (keyboardEvent->defaultHandled()) |
68 return; | 68 return; |
tkent
2014/01/21 09:19:01
m_fieldOwner->fieldDidChangeValueByKeyboard() shou
Habib Virji
2014/01/21 09:26:58
Done.
| |
69 } | 69 } |
70 defaultKeyboardEventHandler(keyboardEvent); | 70 defaultKeyboardEventHandler(keyboardEvent); |
71 if (m_fieldOwner) | |
72 m_fieldOwner->fieldDidChangeValueByKeyboard(); | |
71 if (keyboardEvent->defaultHandled()) | 73 if (keyboardEvent->defaultHandled()) |
72 return; | 74 return; |
73 } | 75 } |
74 | 76 |
75 HTMLElement::defaultEventHandler(event); | 77 HTMLElement::defaultEventHandler(event); |
76 } | 78 } |
77 | 79 |
78 void DateTimeFieldElement::defaultKeyboardEventHandler(KeyboardEvent* keyboardEv ent) | 80 void DateTimeFieldElement::defaultKeyboardEventHandler(KeyboardEvent* keyboardEv ent) |
79 { | 81 { |
80 if (keyboardEvent->type() != EventTypeNames::keydown) | 82 if (keyboardEvent->type() != EventTypeNames::keydown) |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
232 } | 234 } |
233 | 235 |
234 int DateTimeFieldElement::valueForARIAValueNow() const | 236 int DateTimeFieldElement::valueForARIAValueNow() const |
235 { | 237 { |
236 return valueAsInteger(); | 238 return valueAsInteger(); |
237 } | 239 } |
238 | 240 |
239 } // namespace WebCore | 241 } // namespace WebCore |
240 | 242 |
241 #endif | 243 #endif |
OLD | NEW |