Chromium Code Reviews| Index: Source/core/html/shadow/DateTimeFieldElement.cpp |
| diff --git a/Source/core/html/shadow/DateTimeFieldElement.cpp b/Source/core/html/shadow/DateTimeFieldElement.cpp |
| index 1746b0178c46ea0eb7668894af429ca64fa550d3..32354d7b8e1e5dd59429ff40d8b4c8a92a12d253 100644 |
| --- a/Source/core/html/shadow/DateTimeFieldElement.cpp |
| +++ b/Source/core/html/shadow/DateTimeFieldElement.cpp |
| @@ -54,12 +54,6 @@ DateTimeFieldElement::DateTimeFieldElement(Document& document, FieldOwner& field |
| void DateTimeFieldElement::defaultEventHandler(Event* event) |
| { |
| - if (event->type() == EventTypeNames::blur) |
| - didBlur(); |
| - |
| - if (event->type() == EventTypeNames::focus) |
| - didFocus(); |
| - |
| if (event->isKeyboardEvent()) { |
| KeyboardEvent* keyboardEvent = toKeyboardEvent(event); |
| if (!isDisabled() && !isFieldOwnerDisabled() && !isFieldOwnerReadOnly()) { |
| @@ -129,16 +123,11 @@ void DateTimeFieldElement::defaultKeyboardEventHandler(KeyboardEvent* keyboardEv |
| } |
| } |
| -void DateTimeFieldElement::didBlur() |
| -{ |
| - if (m_fieldOwner) |
| - m_fieldOwner->didBlurFromField(); |
| -} |
| - |
| -void DateTimeFieldElement::didFocus() |
| +void DateTimeFieldElement::setFocus(bool value) |
| { |
| if (m_fieldOwner) |
| - m_fieldOwner->didFocusOnField(); |
| + value ? m_fieldOwner->didFocusOnField():m_fieldOwner->didBlurFromField(); |
|
tkent
2014/03/31 04:17:08
nit: Needs spaces around ':'.
Habib Virji
2014/03/31 09:05:51
Done.
|
| + ContainerNode::setFocus(value); |
| } |
| void DateTimeFieldElement::focusOnNextField() |