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..a302c5d116879d95f5c1436828fcd72b5930fe20 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(); |
+ ContainerNode::setFocus(value); |
} |
void DateTimeFieldElement::focusOnNextField() |