Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1203)

Unified Diff: Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp

Issue 24246011: Move form-related 78 files to core/html/forms/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h ('k') | Source/core/html/forms/BaseTextInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698