Index: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp |
diff --git a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp |
similarity index 98% |
rename from Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp |
rename to Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp |
index 3d8f21e078b3575dd2e489dddc78723db868789e..8044e9d5d12df317e38ce0384698ad60506f6557 100644 |
--- a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp |
+++ b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp |
@@ -30,17 +30,17 @@ |
#include "config.h" |
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
-#include "core/html/BaseMultipleFieldsDateAndTimeInputType.h" |
+#include "core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h" |
#include "CSSValueKeywords.h" |
#include "RuntimeEnabledFeatures.h" |
#include "core/dom/KeyboardEvent.h" |
#include "core/dom/shadow/ShadowRoot.h" |
-#include "core/html/DateTimeFieldsState.h" |
-#include "core/html/FormController.h" |
#include "core/html/HTMLDataListElement.h" |
#include "core/html/HTMLInputElement.h" |
#include "core/html/HTMLOptionElement.h" |
+#include "core/html/forms/DateTimeFieldsState.h" |
+#include "core/html/forms/FormController.h" |
#include "core/html/shadow/PickerIndicatorElement.h" |
#include "core/html/shadow/ShadowElementNames.h" |
#include "core/page/FocusController.h" |
@@ -183,9 +183,9 @@ void BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged() |
String oldValue = input->value(); |
String newValue = sanitizeValue(dateTimeEditElement()->value()); |
// Even if oldValue is null and newValue is "", we should assume they are same. |
- if ((oldValue.isEmpty() && newValue.isEmpty()) || oldValue == newValue) |
+ if ((oldValue.isEmpty() && newValue.isEmpty()) || oldValue == newValue) { |
input->setNeedsValidityCheck(); |
- else { |
+ } else { |
input->setValueInternal(newValue, DispatchNoEvent); |
input->setNeedsStyleRecalc(); |
input->dispatchFormControlInputEvent(); |
@@ -381,8 +381,9 @@ void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Element* oldFocuse |
element()->document().page()->focusController().advanceFocus(direction); |
} else if (direction == FocusDirectionNone || direction == FocusDirectionMouse || direction == FocusDirectionPage) { |
edit->focusByOwner(oldFocusedElement); |
- } else |
+ } else { |
edit->focusByOwner(); |
+ } |
} |
void BaseMultipleFieldsDateAndTimeInputType::forwardEvent(Event* event) |
@@ -418,8 +419,9 @@ void BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* e |
if (PickerIndicatorElement* element = pickerIndicatorElement()) |
element->openPopup(); |
event->setDefaultHandled(); |
- } else |
+ } else { |
forwardEvent(event); |
+ } |
} |
bool BaseMultipleFieldsDateAndTimeInputType::hasBadInput() const |