#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
#include "core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h"
-#include "CSSValueKeywords.h"
-#include "RuntimeEnabledFeatures.h"
+#include "core/CSSValueKeywords.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/KeyboardEvent.h"
#include "core/events/ScopedEventQueue.h"
#include "core/page/Page.h"
#include "core/rendering/RenderTheme.h"
#include "platform/DateComponents.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/text/DateTimeFormat.h"
#include "platform/text/PlatformLocale.h"
#include "wtf/DateMath.h"
-namespace WebCore {
+namespace blink {
class DateTimeFormatValidator : public DateTimeFormat::TokenHandler {
public:
if (containsFocusedShadowElement())
return;
EventQueueScope scope;
- RefPtr<HTMLInputElement> protector(element());
+ RefPtrWillBeRawPtr<HTMLInputElement> protector(element());
// Remove focus ring by CSS "focus" pseudo class.
element().setFocus(false);
if (SpinButtonElement *spinButton = spinButtonElement())
void BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged()
{
- RefPtr<HTMLInputElement> input(element());
+ RefPtrWillBeRawPtr<HTMLInputElement> input(element());
String oldValue = input->value();
String newValue = sanitizeValue(dateTimeEditElement()->value());
// Even if oldValue is null and newValue is "", we should assume they are same.
newDisplay = INLINE_FLEX;
else if (originalDisplay == BLOCK)
newDisplay = FLEX;
- TextDirection contentDirection = element().locale().isRTL() ? RTL : LTR;
+ TextDirection contentDirection = computedTextDirection();
if (originalStyle->direction() == contentDirection && originalDisplay == newDisplay)
return originalStyle;
}
}
-bool BaseMultipleFieldsDateAndTimeInputType::shouldUseInputMethod() const
-{
- return false;
-}
-
void BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged()
{
updateView();
void BaseMultipleFieldsDateAndTimeInputType::clearValue()
{
- RefPtr<HTMLInputElement> input(element());
+ RefPtrWillBeRawPtr<HTMLInputElement> input(element());
input->setValue("", DispatchInputAndChangeEvent);
input->updateClearButtonVisibility();
}
}
}
-} // namespace WebCore
+TextDirection BaseMultipleFieldsDateAndTimeInputType::computedTextDirection()
+{
+ return element().locale().isRTL() ? RTL : LTR;
+}
+
+} // namespace blink
#endif