Add code for input[type=date] with the multiple fields UI
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2012 07:49:58 +0000 (07:49 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Oct 2012 07:49:58 +0000 (07:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98340

Reviewed by Hajime Morita.

Source/WebCore:

The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
moment, there are no platforms enabling the new code. We're going to
enable it soon on desktop Chromium, and add tests. Then we're going to
remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).

ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
is represetnted as a kind of text field, and it has code to invoke a
calendar picker.
ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
support + text field UI of input[type=date]. Now it means only calendar
picker support.

* html/DateInputType.h:
(WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
!ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
for multiple fields UI.
(DateInputType): Wrap the code for text fields behavior and calendar
picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
ENABLE(INPUT_MULTIPLE_FIELDS_UI)
* html/DateInputType.cpp:
(WebCore::DateInputType::DateInputType):
Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
(WebCore): ditto.
(WebCore::DateInputType::formatDateTimeFieldsState):
A callback for multiple fields UI. This constructs a string value from
each of values of multiple fields.
Note that we don't need to do +1 to month().
(WebCore::DateInputType::setupLayoutParameters):
A callback for multiple fields UI. Passes information to build UI.

* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
Initialize m_pickerIndicatorIsAlwaysVisible.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
If a type supports calendar picker, we should always show the picker
indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
RenderTheme for support status of each of types.
Add a local variable 'document' to avoid multiple element()->document().
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
- If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
- Wrap the code with appropriate flags.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::supportsCalendarPicker): Added.
* rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
Added. Delegate to RenderThemeChromiumCommon.
* rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
Added. Delegate to RenderThemeChromiumCommon.
* rendering/RenderThemeChromiumCommon.h:
(RenderThemeChromiumCommon): Declare supportsCalendarPicker.
* rendering/RenderThemeChromiumCommon.cpp:
(WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
Returns true if the type is "date."

* html/DateTimeFieldsState.h:
(DateTimeFieldsState): Add a comment for the m_month field.

Source/WebKit/chromium:

* features.gypi: Add ENABLE_INPUT_TYPE_DATE_LEGACY_UI=1 for non-Android.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130369 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp
Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.h
Source/WebCore/html/DateInputType.cpp
Source/WebCore/html/DateInputType.h
Source/WebCore/html/DateTimeFieldsState.h
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeChromiumCommon.cpp
Source/WebCore/rendering/RenderThemeChromiumCommon.h
Source/WebCore/rendering/RenderThemeChromiumMac.h
Source/WebCore/rendering/RenderThemeChromiumMac.mm
Source/WebCore/rendering/RenderThemeChromiumSkia.cpp
Source/WebCore/rendering/RenderThemeChromiumSkia.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi

index 4a989f1..4384ae8 100644 (file)
@@ -1,5 +1,76 @@
 2012-10-04  Kent Tamura  <tkent@chromium.org>
 
+        Add code for input[type=date] with the multiple fields UI
+        https://bugs.webkit.org/show_bug.cgi?id=98340
+
+        Reviewed by Hajime Morita.
+
+        The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
+        moment, there are no platforms enabling the new code. We're going to
+        enable it soon on desktop Chromium, and add tests. Then we're going to
+        remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).
+
+        ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
+        is represetnted as a kind of text field, and it has code to invoke a
+        calendar picker.
+        ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
+        support + text field UI of input[type=date]. Now it means only calendar
+        picker support.
+
+        * html/DateInputType.h:
+        (WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
+        !ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
+        for multiple fields UI.
+        (DateInputType): Wrap the code for text fields behavior and calendar
+        picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
+        ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+        * html/DateInputType.cpp:
+        (WebCore::DateInputType::DateInputType):
+        Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
+        (WebCore): ditto.
+        (WebCore::DateInputType::formatDateTimeFieldsState):
+        A callback for multiple fields UI. This constructs a string value from
+        each of values of multiple fields.
+        Note that we don't need to do +1 to month().
+        (WebCore::DateInputType::setupLayoutParameters):
+        A callback for multiple fields UI. Passes information to build UI.
+
+        * html/BaseMultipleFieldsDateAndTimeInputType.h:
+        (BaseMultipleFieldsDateAndTimeInputType):
+        Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
+        * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
+        (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
+        Initialize m_pickerIndicatorIsAlwaysVisible.
+        (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
+        If a type supports calendar picker, we should always show the picker
+        indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
+        RenderTheme for support status of each of types.
+        Add a local variable 'document' to avoid multiple element()->document().
+        (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
+        - If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
+        - Wrap the code with appropriate flags.
+
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::supportsCalendarPicker): Added.
+        * rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
+        * rendering/RenderThemeChromiumMac.mm:
+        (WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
+        Added. Delegate to RenderThemeChromiumCommon.
+        * rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
+        Added. Delegate to RenderThemeChromiumCommon.
+        * rendering/RenderThemeChromiumCommon.h:
+        (RenderThemeChromiumCommon): Declare supportsCalendarPicker.
+        * rendering/RenderThemeChromiumCommon.cpp:
+        (WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
+        Returns true if the type is "date."
+
+        * html/DateTimeFieldsState.h:
+        (DateTimeFieldsState): Add a comment for the m_month field.
+
+2012-10-04  Kent Tamura  <tkent@chromium.org>
+
         DateTimeYearFieldElement should respect min/max values specified by page authors
         https://bugs.webkit.org/show_bug.cgi?id=98227
 
index bd0cafa..e30c40e 100644 (file)
@@ -42,7 +42,9 @@
 #include "HTMLOptionElement.h"
 #include "KeyboardEvent.h"
 #include "Localizer.h"
+#include "Page.h"
 #include "PickerIndicatorElement.h"
+#include "RenderTheme.h"
 #include "ShadowRoot.h"
 #include <wtf/DateMath.h>
 
@@ -96,6 +98,7 @@ BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType(H
     , m_dateTimeEditElement(0)
     , m_pickerIndicatorElement(0)
     , m_pickerIndicatorIsVisible(false)
+    , m_pickerIndicatorIsAlwaysVisible(false)
 {
 }
 
@@ -122,24 +125,37 @@ void BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree()
 
     ASSERT(element()->shadow());
 
-    RefPtr<HTMLDivElement> container = HTMLDivElement::create(element()->document());
+    Document* document = element()->document();
+    RefPtr<HTMLDivElement> container = HTMLDivElement::create(document);
     element()->userAgentShadowRoot()->appendChild(container);
     container->setShadowPseudoId(dateAndTimeInputContainerPseudoId);
 
-    RefPtr<DateTimeEditElement> dateTimeEditElement(DateTimeEditElement::create(element()->document(), *this));
+    RefPtr<DateTimeEditElement> dateTimeEditElement(DateTimeEditElement::create(document, *this));
     m_dateTimeEditElement = dateTimeEditElement.get();
     container->appendChild(m_dateTimeEditElement);
     updateInnerTextValue();
 
+#if ENABLE(DATALIST_ELEMENT) || ENABLE(CALENDAR_PICKER)
+    bool shouldAddPickerIndicator = false;
 #if ENABLE(DATALIST_ELEMENT)
-    if (InputType::themeSupportsDataListUI(this)) {
-        RefPtr<PickerIndicatorElement> pickerElement = PickerIndicatorElement::create(element()->document());
+    if (InputType::themeSupportsDataListUI(this))
+        shouldAddPickerIndicator = true;
+#endif
+#if ENABLE(CALENDAR_PICKER)
+    RefPtr<RenderTheme> theme = document->page() ? document->page()->theme() : RenderTheme::defaultTheme();
+    if (theme->supportsCalendarPicker(formControlType())) {
+        shouldAddPickerIndicator = true;
+        m_pickerIndicatorIsAlwaysVisible = true;
+    }
+#endif
+    if (shouldAddPickerIndicator) {
+        RefPtr<PickerIndicatorElement> pickerElement = PickerIndicatorElement::create(document);
         m_pickerIndicatorElement = pickerElement.get();
         container->appendChild(m_pickerIndicatorElement);
         m_pickerIndicatorIsVisible = true;
         updatePickerIndicatorVisibility();
     }
-#endif
+#endif // ENABLE(DATALIST_ELEMENT) || ENABLE(CALENDAR_PICKER)
 }
 
 void BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree()
@@ -270,9 +286,18 @@ void BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged()
 {
     updatePickerIndicatorVisibility();
 }
+#endif
 
+#if ENABLE(DATALIST_ELEMENT) || ENABLE(CALENDAR_PICKER)
 void BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility()
 {
+#if ENABLE(CALENDAR_PICKER)
+    if (m_pickerIndicatorIsAlwaysVisible) {
+        showPickerIndicator();
+        return;
+    }
+#endif
+#if ENABLE(DATALIST_ELEMENT)
     if (HTMLDataListElement* dataList = element()->dataList()) {
         RefPtr<HTMLCollection> options = dataList->options();
         for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) {
@@ -283,6 +308,7 @@ void BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility()
         }
     }
     hidePickerIndicator();
+#endif
 }
 
 void BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator()
@@ -302,7 +328,7 @@ void BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator()
     ASSERT(m_pickerIndicatorElement);
     m_pickerIndicatorElement->removeInlineStyleProperty(CSSPropertyDisplay);
 }
-#endif
+#endif // ENABLE(DATALIST_ELEMENT) || ENABLE(CALENDAR_PICKER)
 
 int BaseMultipleFieldsDateAndTimeInputType::fullYear(const String& source) const
 {
index 5f30837..3193304 100644 (file)
@@ -86,8 +86,13 @@ private:
     void updatePickerIndicatorVisibility();
 
     DateTimeEditElement* m_dateTimeEditElement;
+#if ENABLE(DATALIST_ELEMENT) || ENABLE(CALENDAR_PICKER)
     PickerIndicatorElement* m_pickerIndicatorElement;
     bool m_pickerIndicatorIsVisible;
+#if ENABLE(CALENDAR_PICKER)
+    bool m_pickerIndicatorIsAlwaysVisible;
+#endif
+#endif
 };
 
 } // namespace WebCore
index 6aa02d2..a3a34cc 100644 (file)
 #include "DateInputType.h"
 
 #include "DateComponents.h"
+#include "DateTimeFieldsState.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "InputTypeNames.h"
 #include "KeyboardEvent.h"
+#include "LocalizedStrings.h"
 #include "Localizer.h"
 #include "PickerIndicatorElement.h"
 #include <wtf/PassOwnPtr.h>
@@ -51,8 +53,8 @@ static const int dateDefaultStepBase = 0;
 static const int dateStepScaleFactor = 86400000;
 
 inline DateInputType::DateInputType(HTMLInputElement* element)
-    : BaseDateAndTimeInputType(element)
-#if ENABLE(CALENDAR_PICKER)
+    : BaseDateInputType(element)
+#if ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
     , m_pickerElement(0)
 #endif
 {
@@ -102,7 +104,7 @@ bool DateInputType::isDateField() const
     return true;
 }
 
-#if ENABLE(CALENDAR_PICKER)
+#if ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
 void DateInputType::createShadowSubtree()
 {
     BaseDateAndTimeInputType::createShadowSubtree();
@@ -166,7 +168,28 @@ String DateInputType::fixedPlaceholder()
 {
     return element()->localizer().dateFormatText();
 }
-#endif // ENABLE(CALENDAR_PICKER)
+#endif // ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
+
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && !ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
+String DateInputType::formatDateTimeFieldsState(const DateTimeFieldsState& dateTimeFieldsState) const
+{
+    if (!dateTimeFieldsState.hasDayOfMonth() || !dateTimeFieldsState.hasMonth() || !dateTimeFieldsState.hasYear())
+        return emptyString();
+
+    return String::format("%04u-%02u-%02u", dateTimeFieldsState.year(), dateTimeFieldsState.month(), dateTimeFieldsState.dayOfMonth());
+}
+
+void DateInputType::setupLayoutParameters(DateTimeEditElement::LayoutParameters& layoutParameters, const DateComponents& date) const
+{
+    layoutParameters.dateTimeFormat = layoutParameters.localizer.dateFormat();
+    layoutParameters.fallbackDateTimeFormat = ASCIILiteral("yyyy-MM-dd");
+    layoutParameters.minimumYear = fullYear(element()->fastGetAttribute(minAttr));
+    layoutParameters.maximumYear = fullYear(element()->fastGetAttribute(maxAttr));
+    layoutParameters.placeholderForDay = placeholderForDayOfMonthField();
+    layoutParameters.placeholderForMonth = placeholderForMonthField();
+    layoutParameters.placeholderForYear = placeholderForYearField();
+}
+#endif
 
 } // namespace WebCore
 #endif
index 37b3cec..51ed57f 100644 (file)
 #ifndef DateInputType_h
 #define DateInputType_h
 
-#include "BaseDateAndTimeInputType.h"
-#include <wtf/RefPtr.h>
-
 #if ENABLE(INPUT_TYPE_DATE)
+#include "BaseMultipleFieldsDateAndTimeInputType.h"
+#include <wtf/RefPtr.h>
 
 namespace WebCore {
 
 class PickerIndicatorElement;
 
-class DateInputType : public BaseDateAndTimeInputType {
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && !ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
+typedef BaseMultipleFieldsDateAndTimeInputType BaseDateInputType;
+#else
+typedef BaseDateAndTimeInputType BaseDateInputType;
+#endif
+
+class DateInputType : public BaseDateInputType {
 public:
     static PassOwnPtr<InputType> create(HTMLInputElement*);
 
@@ -52,7 +57,8 @@ private:
     virtual bool parseToDateComponentsInternal(const UChar*, unsigned length, DateComponents*) const OVERRIDE;
     virtual bool setMillisecondToDateComponents(double, DateComponents*) const OVERRIDE;
     virtual bool isDateField() const OVERRIDE;
-#if ENABLE(CALENDAR_PICKER)
+
+#if ENABLE(INPUT_TYPE_DATE_LEGACY_UI)
     virtual void createShadowSubtree() OVERRIDE;
     virtual void destroyShadowSubtree() OVERRIDE;
     virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
@@ -66,6 +72,12 @@ private:
     virtual bool shouldHaveSpinButton() const OVERRIDE;
 
     PickerIndicatorElement* m_pickerElement;
+#else
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+    // BaseMultipleFieldsDateAndTimeInputType functions
+    virtual String formatDateTimeFieldsState(const DateTimeFieldsState&) const OVERRIDE;
+    virtual void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, const DateComponents&) const OVERRIDE;
+#endif
 #endif
 };
 
index a924dda..2dd2195 100644 (file)
@@ -87,7 +87,7 @@ public:
 
 private:
     unsigned m_year;
-    unsigned m_month;
+    unsigned m_month; // 1 to 12.
     unsigned m_dayOfMonth;
     unsigned m_hour; // 1 to 12.
     unsigned m_minute;
index 6026b60..36e49f2 100644 (file)
@@ -137,6 +137,11 @@ public:
     // A method asking if the platform is able to show datalist suggestions for a given input type.
     virtual bool supportsDataListUI(const AtomicString&) const { return false; }
 
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+    // A method asking if the platform is able to show a calendar picker for a given input type.
+    virtual bool supportsCalendarPicker(const AtomicString&) const { return false; }
+#endif
+
     // Text selection colors.
     Color activeSelectionBackgroundColor() const;
     Color inactiveSelectionBackgroundColor() const;
index 2d646f4..359577a 100644 (file)
@@ -46,6 +46,14 @@ bool RenderThemeChromiumCommon::supportsDataListUI(const AtomicString& type)
         || type == InputTypeNames::range();
 }
 
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+bool RenderThemeChromiumCommon::supportsCalendarPicker(const AtomicString& type)
+{
+    // FIXME: We'd like to support datetime, datetime-local, month, and week too.
+    return type == InputTypeNames::date();
+}
+#endif
+
 LayoutUnit RenderThemeChromiumCommon::sliderTickSnappingThreshold()
 {
     return 5;
index 80aeca9..8c05acf 100644 (file)
@@ -35,6 +35,9 @@ namespace WebCore {
 class RenderThemeChromiumCommon {
 public:
     static bool supportsDataListUI(const AtomicString& type);
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+    static bool supportsCalendarPicker(const AtomicString& type);
+#endif
     static LayoutUnit sliderTickSnappingThreshold();
 };
 
index cfd13df..240dcf9 100644 (file)
@@ -77,6 +77,9 @@ private:
 #if ENABLE(CALENDAR_PICKER)
     virtual CString extraCalendarPickerStyleSheet() OVERRIDE;
 #endif
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+    virtual bool supportsCalendarPicker(const AtomicString& type) const OVERRIDE;
+#endif
     virtual bool shouldShowPlaceholderWhenFocused() const OVERRIDE;
 };
 
index efb6174..56d9ea6 100644 (file)
@@ -189,6 +189,13 @@ CString RenderThemeChromiumMac::extraCalendarPickerStyleSheet()
 }
 #endif
 
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+bool RenderThemeChromiumMac::supportsCalendarPicker(const AtomicString& type) const
+{
+    return RenderThemeChromiumCommon::supportsCalendarPicker(type);
+}
+#endif
+
 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
 {
     return true;
index a38cf1b..4e504ca 100644 (file)
@@ -131,6 +131,13 @@ bool RenderThemeChromiumSkia::supportsDataListUI(const AtomicString& type) const
     return RenderThemeChromiumCommon::supportsDataListUI(type);
 }
 
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+bool RenderThemeChromiumSkia::supportsCalendarPicker(const AtomicString& type) const
+{
+    return RenderThemeChromiumCommon::supportsCalendarPicker(type);
+}
+#endif
+
 #if ENABLE(VIDEO_TRACK)
 bool RenderThemeChromiumSkia::supportsClosedCaptioning() const
 {
index 10dc70b..b9da522 100644 (file)
@@ -181,6 +181,9 @@ private:
 #if ENABLE(DATALIST_ELEMENT)
     virtual LayoutUnit sliderTickSnappingThreshold() const OVERRIDE;
 #endif
+#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) && ENABLE(CALENDAR_PICKER)
+    virtual bool supportsCalendarPicker(const AtomicString& type) const OVERRIDE;
+#endif
 
     int menuListInternalPadding(RenderStyle*, int paddingType) const;
     bool paintMediaButtonInternal(GraphicsContext*, const IntRect&, Image*);
index be3c689..f278e9a 100644 (file)
@@ -1,3 +1,12 @@
+2012-10-04  Kent Tamura  <tkent@chromium.org>
+
+        Add code for input[type=date] with the multiple fields UI
+        https://bugs.webkit.org/show_bug.cgi?id=98340
+
+        Reviewed by Hajime Morita.
+
+        * features.gypi: Add ENABLE_INPUT_TYPE_DATE_LEGACY_UI=1 for non-Android.
+
 2012-10-03  Keishi Hattori  <keishi@webkit.org>
 
         Implement localizeValue for TimeInputType
index 7aebe5e..b7c17ce 100644 (file)
           'ENABLE_DATALIST_ELEMENT=1',
           'ENABLE_INPUT_SPEECH=1',
           'ENABLE_INPUT_TYPE_COLOR=1',
+          'ENABLE_INPUT_TYPE_DATE_LEGACY_UI=1',
           'ENABLE_INPUT_MULTIPLE_FIELDS_UI=1',
           'ENABLE_JAVASCRIPT_I18N_API=1',
           'ENABLE_LEGACY_NOTIFICATIONS=1',