Title: [123826] trunk
Revision
123826
Author
yo...@chromium.org
Date
2012-07-26 18:27:06 -0700 (Thu, 26 Jul 2012)

Log Message

[Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
https://bugs.webkit.org/show_bug.cgi?id=92339

Reviewed by Kent Tamura.

Source/WebCore: 

To detect compilation errors and test failure earlier, I would like
build and run tests for input type datetime, datetime-local, month,
time and week with runtime feature flags to avoid behavior changes
other than test shell.

This patch adds runtime features for input types, datetime, datetime-local,
month, time and week and integrates them into InputType::createInputTypeFactoryMap
to follow runtime feature flags.

At this time, these runtime features are enabled by default for all
ports define ENABLE_INPUT_TYPE_XXX except for Chromium port other than
Android. I'll remove these #if after I update Chromium browser for
disabling them for non-Android.

No new tests. Enabling disabled tests (fast/forms/datetime, fast/forms/dattimelocal,
fast/forms/month, fast/forms/time, fast/forms/week)

* bindings/generic/RuntimeEnabledFeatures.cpp: Added initializations of
variables for runtime features of input types.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Added.
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap): Register input types datetime,
datetime-local, month, time and week if corresponding runtime feature
flag is enabled.
* html/InputType.h: Changed indentation to force building *InputType.cpp for
making Chromium-win bots to be happy.

Source/WebKit/chromium: 

To detect compilation errors and test failure earlier, I would like
build and run tests for input type datetime, datetime-local, month,
time and week with runtime feature flags to avoid behavior changes
on chromium browser.

This patch adds query and change functions for runtime features of
input type datetime, datetime-local, month, time and week to WebRuntimeFeatures
class for exposing DRT and chromium browser expermental flags.

* features.gypi: Turn on ENABLE_INPUT_TYPE_DATETIME, ENABLE_INPUT_TYPE_DATETIMELOCAL,
ENABLE_INPUT_TYPE_MONTH, ENABLE_INPUT_TYPE_TIME, and ENABLE_INPUT_TYPE_WEEK for all OS.
* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableInputTypeDateTime): Added.
(WebKit::WebRuntimeFeatures::isInputTypeDateTimeEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeDateTimeLocal): Added.
(WebKit::WebRuntimeFeatures::isInputTypeDateTimeLocalEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeMonth): Added.
(WebKit::WebRuntimeFeatures::isInputTypeMonthEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeTime): Added.
(WebKit::WebRuntimeFeatures::isInputTypeTimeEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeWeek): Added.
(WebKit::WebRuntimeFeatures::isInputTypeWeekEnabled): Added.

Tools: 

This patch enables runtime features for input type datetime, datetime-local,
month, time and week for Chromium DRT.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell): Call enableInputType{DateTime,DateTimeLocal,Month,Time,Week}.

LayoutTests: 

This patch enables tests for input type datetime, datetime-local,
month, time and week for Chromium ports.

* platform/chromium/TestExpectations: Removed disabled directives for
input type datetime, datetime-local, month, time and week.
* platform/chromium/fast/forms/datalist/input-list-expected.txt: Updated
expecations for input type datetime, datetime-local, month, time and week
to null for IDL list attribute. So far, these expectations specified
HTMLDataListElement for input type "text" as unsupported input types.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (123825 => 123826)


--- trunk/LayoutTests/ChangeLog	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/LayoutTests/ChangeLog	2012-07-27 01:27:06 UTC (rev 123826)
@@ -1,3 +1,20 @@
+2012-07-26  Yoshifumi Inoue  <yo...@chromium.org>
+
+        [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
+        https://bugs.webkit.org/show_bug.cgi?id=92339
+
+        Reviewed by Kent Tamura.
+
+        This patch enables tests for input type datetime, datetime-local,
+        month, time and week for Chromium ports.
+
+        * platform/chromium/TestExpectations: Removed disabled directives for
+        input type datetime, datetime-local, month, time and week.
+        * platform/chromium/fast/forms/datalist/input-list-expected.txt: Updated
+        expecations for input type datetime, datetime-local, month, time and week
+        to null for IDL list attribute. So far, these expectations specified
+        HTMLDataListElement for input type "text" as unsupported input types.
+
 2012-07-26  Brian Weinstein  <bweinst...@apple.com>
 
         Unreviewed rebaseline after r123790.

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (123825 => 123826)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-27 01:27:06 UTC (rev 123826)
@@ -1103,21 +1103,6 @@
 // HTML5 DB layout tests
 BUGCR27697 SKIP : storage/websql/hash-change-with-xhr.html = PASS
 
-// Implementation of Date/time input types are incomplete and
-// ENABLE_INPUT_TYPE_* flags are not enabled.
-BUGWK29359 : fast/forms/datetime = TEXT
-BUGWK29359 : fast/forms/datetimelocal/ValidityState-rangeOverflow-datetimelocal.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/ValidityState-rangeUnderflow-datetimelocal.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/ValidityState-stepMismatch-datetimelocal.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/datetimelocal-input-type.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/datetimelocal-input-visible-string.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/datetimelocal-stepup-stepdown-from-renderer.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html = TEXT
-BUGWK29359 : fast/forms/datetimelocal/input-valueasnumber-datetimelocal.html = TEXT
-BUGWK29359 : fast/forms/month = TEXT
-BUGWK29359 : fast/forms/time = TEXT
-BUGWK29359 : fast/forms/week = TEXT
 // Need rebaseline
 BUGWK84827 : fast/forms/date/calendar-picker-appearance.html = IMAGE PASS MISSING
 

Modified: trunk/LayoutTests/platform/chromium/fast/forms/datalist/input-list-expected.txt (123825 => 123826)


--- trunk/LayoutTests/platform/chromium/fast/forms/datalist/input-list-expected.txt	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/LayoutTests/platform/chromium/fast/forms/datalist/input-list-expected.txt	2012-07-27 01:27:06 UTC (rev 123826)
@@ -12,12 +12,12 @@
 PASS document.getElementById("url").list is document.getElementById("dl1")
 PASS document.getElementById("telephone").list is document.getElementById("dl1")
 PASS document.getElementById("email").list is document.getElementById("dl1")
-PASS document.getElementById("datetime").list is document.getElementById("dl1")
+FAIL document.getElementById("datetime").list should be [object HTMLDataListElement]. Was null.
 FAIL document.getElementById("date").list should be [object HTMLDataListElement]. Was null.
-PASS document.getElementById("month").list is document.getElementById("dl1")
-PASS document.getElementById("week").list is document.getElementById("dl1")
-PASS document.getElementById("time").list is document.getElementById("dl1")
-PASS document.getElementById("datetime-local").list is document.getElementById("dl1")
+FAIL document.getElementById("month").list should be [object HTMLDataListElement]. Was null.
+FAIL document.getElementById("week").list should be [object HTMLDataListElement]. Was null.
+FAIL document.getElementById("time").list should be [object HTMLDataListElement]. Was null.
+FAIL document.getElementById("datetime-local").list should be [object HTMLDataListElement]. Was null.
 PASS document.getElementById("number").list is document.getElementById("dl1")
 PASS document.getElementById("range").list is document.getElementById("dl1")
 FAIL document.getElementById("color").list should be [object HTMLDataListElement]. Was null.

Modified: trunk/Source/WebCore/ChangeLog (123825 => 123826)


--- trunk/Source/WebCore/ChangeLog	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebCore/ChangeLog	2012-07-27 01:27:06 UTC (rev 123826)
@@ -1,3 +1,47 @@
+2012-07-26  Yoshifumi Inoue  <yo...@chromium.org>
+
+        [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
+        https://bugs.webkit.org/show_bug.cgi?id=92339
+
+        Reviewed by Kent Tamura.
+
+        To detect compilation errors and test failure earlier, I would like
+        build and run tests for input type datetime, datetime-local, month,
+        time and week with runtime feature flags to avoid behavior changes
+        other than test shell.
+
+        This patch adds runtime features for input types, datetime, datetime-local,
+        month, time and week and integrates them into InputType::createInputTypeFactoryMap
+        to follow runtime feature flags.
+
+        At this time, these runtime features are enabled by default for all
+        ports define ENABLE_INPUT_TYPE_XXX except for Chromium port other than
+        Android. I'll remove these #if after I update Chromium browser for
+        disabling them for non-Android.
+
+        No new tests. Enabling disabled tests (fast/forms/datetime, fast/forms/dattimelocal,
+        fast/forms/month, fast/forms/time, fast/forms/week)
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp: Added initializations of
+        variables for runtime features of input types.
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled): Added.
+        (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Added.
+        * html/InputType.cpp:
+        (WebCore::createInputTypeFactoryMap): Register input types datetime,
+        datetime-local, month, time and week if corresponding runtime feature
+        flag is enabled.
+        * html/InputType.h: Changed indentation to force building *InputType.cpp for
+        making Chromium-win bots to be happy.
+
 2012-07-26  Xianzhu Wang  <wangxian...@chromium.org>
 
         [Chromium-Android] Don't overlay scrollbars in layout test mode

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (123825 => 123826)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-07-27 01:27:06 UTC (rev 123826)
@@ -198,6 +198,46 @@
 bool RuntimeEnabledFeatures::isInputTypeDateEnabled = true;
 #endif
 
+#if ENABLE(INPUT_TYPE_DATETIME)
+#if PLATFORM(CHROMIUM) && !OS(ANDROID)
+bool RuntimeEnabledFeatures::isInputTypeDateTimeEnabled = false;
+#else
+bool RuntimeEnabledFeatures::isInputTypeDateTimeEnabled = true;
+#endif
+#endif
+
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+#if PLATFORM(CHROMIUM) && !OS(ANDROID)
+bool RuntimeEnabledFeatures::isInputTypeDateTimeLocalEnabled = false;
+#else
+bool RuntimeEnabledFeatures::isInputTypeDateTimeLocalEnabled = true;
+#endif
+#endif
+
+#if ENABLE(INPUT_TYPE_MONTH)
+#if PLATFORM(CHROMIUM) && !OS(ANDROID)
+bool RuntimeEnabledFeatures::isInputTypeMonthEnabled = false;
+#else
+bool RuntimeEnabledFeatures::isInputTypeMonthEnabled = true;
+#endif
+#endif
+
+#if ENABLE(INPUT_TYPE_TIME)
+#if PLATFORM(CHROMIUM) && !OS(ANDROID)
+bool RuntimeEnabledFeatures::isInputTypeTimeEnabled = false;
+#else
+bool RuntimeEnabledFeatures::isInputTypeTimeEnabled = true;
+#endif
+#endif
+
+#if ENABLE(INPUT_TYPE_WEEK)
+#if PLATFORM(CHROMIUM) && !OS(ANDROID)
+bool RuntimeEnabledFeatures::isInputTypeWeekEnabled = false;
+#else
+bool RuntimeEnabledFeatures::isInputTypeWeekEnabled = true;
+#endif
+#endif
+
 #if ENABLE(DIALOG_ELEMENT)
 bool RuntimeEnabledFeatures::isDialogElementEnabled = false;
 #endif

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (123825 => 123826)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-07-27 01:27:06 UTC (rev 123826)
@@ -230,6 +230,31 @@
     static void setInputTypeDateEnabled(bool isEnabled) { isInputTypeDateEnabled = isEnabled; }
 #endif
 
+#if ENABLE(INPUT_TYPE_DATETIME)
+    static bool inputTypeDateTimeEnabled() { return isInputTypeDateTimeEnabled; }
+    static void setInputTypeDateTimeEnabled(bool isEnabled) { isInputTypeDateTimeEnabled = isEnabled; }
+#endif
+
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+    static bool inputTypeDateTimeLocalEnabled() { return isInputTypeDateTimeLocalEnabled; }
+    static void setInputTypeDateTimeLocalEnabled(bool isEnabled) { isInputTypeDateTimeLocalEnabled = isEnabled; }
+#endif
+
+#if ENABLE(INPUT_TYPE_MONTH)
+    static bool inputTypeMonthEnabled() { return isInputTypeMonthEnabled; }
+    static void setInputTypeMonthEnabled(bool isEnabled) { isInputTypeMonthEnabled = isEnabled; }
+#endif
+
+#if ENABLE(INPUT_TYPE_TIME)
+    static bool inputTypeTimeEnabled() { return isInputTypeTimeEnabled; }
+    static void setInputTypeTimeEnabled(bool isEnabled) { isInputTypeTimeEnabled = isEnabled; }
+#endif
+
+#if ENABLE(INPUT_TYPE_WEEK)
+    static bool inputTypeWeekEnabled() { return isInputTypeWeekEnabled; }
+    static void setInputTypeWeekEnabled(bool isEnabled) { isInputTypeWeekEnabled = isEnabled; }
+#endif
+
 #if ENABLE(DIALOG_ELEMENT)
     static bool dialogElementEnabled() { return isDialogElementEnabled; }
     static void setDialogElementEnabled(bool isEnabled) { isDialogElementEnabled = isEnabled; }
@@ -309,6 +334,26 @@
     static bool isInputTypeDateEnabled;
 #endif
 
+#if ENABLE(INPUT_TYPE_DATETIME)
+    static bool isInputTypeDateTimeEnabled;
+#endif
+
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+    static bool isInputTypeDateTimeLocalEnabled;
+#endif
+
+#if ENABLE(INPUT_TYPE_MONTH)
+    static bool isInputTypeMonthEnabled;
+#endif
+
+#if ENABLE(INPUT_TYPE_TIME)
+    static bool isInputTypeTimeEnabled;
+#endif
+
+#if ENABLE(INPUT_TYPE_WEEK)
+    static bool isInputTypeWeekEnabled;
+#endif
+
 #if ENABLE(DIALOG_ELEMENT)
     static bool isDialogElementEnabled;
 #endif

Modified: trunk/Source/WebCore/html/InputType.cpp (123825 => 123826)


--- trunk/Source/WebCore/html/InputType.cpp	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebCore/html/InputType.cpp	2012-07-27 01:27:06 UTC (rev 123826)
@@ -98,17 +98,20 @@
         map->add(InputTypeNames::date(), DateInputType::create);
 #endif
 #if ENABLE(INPUT_TYPE_DATETIME)
-    map->add(InputTypeNames::datetime(), DateTimeInputType::create);
+    if (RuntimeEnabledFeatures::inputTypeDateTimeEnabled())
+        map->add(InputTypeNames::datetime(), DateTimeInputType::create);
 #endif
 #if ENABLE(INPUT_TYPE_DATETIMELOCAL)
-    map->add(InputTypeNames::datetimelocal(), DateTimeLocalInputType::create);
+    if (RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled())
+        map->add(InputTypeNames::datetimelocal(), DateTimeLocalInputType::create);
 #endif
     map->add(InputTypeNames::email(), EmailInputType::create);
     map->add(InputTypeNames::file(), FileInputType::create);
     map->add(InputTypeNames::hidden(), HiddenInputType::create);
     map->add(InputTypeNames::image(), ImageInputType::create);
 #if ENABLE(INPUT_TYPE_MONTH)
-    map->add(InputTypeNames::month(), MonthInputType::create);
+    if (RuntimeEnabledFeatures::inputTypeMonthEnabled())
+        map->add(InputTypeNames::month(), MonthInputType::create);
 #endif
     map->add(InputTypeNames::number(), NumberInputType::create);
     map->add(InputTypeNames::password(), PasswordInputType::create);
@@ -119,11 +122,13 @@
     map->add(InputTypeNames::submit(), SubmitInputType::create);
     map->add(InputTypeNames::telephone(), TelephoneInputType::create);
 #if ENABLE(INPUT_TYPE_TIME)
-    map->add(InputTypeNames::time(), TimeInputType::create);
+    if (RuntimeEnabledFeatures::inputTypeTimeEnabled())
+        map->add(InputTypeNames::time(), TimeInputType::create);
 #endif
     map->add(InputTypeNames::url(), URLInputType::create);
 #if ENABLE(INPUT_TYPE_WEEK)
-    map->add(InputTypeNames::week(), WeekInputType::create);
+    if (RuntimeEnabledFeatures::inputTypeWeekEnabled())
+        map->add(InputTypeNames::week(), WeekInputType::create);
 #endif
     // No need to register "text" because it is the default type.
     return map.release();

Modified: trunk/Source/WebCore/html/InputType.h (123825 => 123826)


--- trunk/Source/WebCore/html/InputType.h	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebCore/html/InputType.h	2012-07-27 01:27:06 UTC (rev 123826)
@@ -79,7 +79,9 @@
 // Do not expose instances of InputType and classes derived from it to classes
 // other than HTMLInputElement.
 class InputType {
-    WTF_MAKE_NONCOPYABLE(InputType); WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_NONCOPYABLE(InputType);
+    WTF_MAKE_FAST_ALLOCATED;
+
 public:
     static PassOwnPtr<InputType> create(HTMLInputElement*, const String&);
     static PassOwnPtr<InputType> createText(HTMLInputElement*);

Modified: trunk/Source/WebKit/chromium/ChangeLog (123825 => 123826)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-27 01:27:06 UTC (rev 123826)
@@ -1,3 +1,35 @@
+2012-07-26  Yoshifumi Inoue  <yo...@chromium.org>
+
+        [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
+        https://bugs.webkit.org/show_bug.cgi?id=92339
+
+        Reviewed by Kent Tamura.
+
+        To detect compilation errors and test failure earlier, I would like
+        build and run tests for input type datetime, datetime-local, month,
+        time and week with runtime feature flags to avoid behavior changes
+        on chromium browser.
+
+        This patch adds query and change functions for runtime features of
+        input type datetime, datetime-local, month, time and week to WebRuntimeFeatures
+        class for exposing DRT and chromium browser expermental flags.
+
+        * features.gypi: Turn on ENABLE_INPUT_TYPE_DATETIME, ENABLE_INPUT_TYPE_DATETIMELOCAL,
+        ENABLE_INPUT_TYPE_MONTH, ENABLE_INPUT_TYPE_TIME, and ENABLE_INPUT_TYPE_WEEK for all OS.
+        * public/WebRuntimeFeatures.h:
+        (WebRuntimeFeatures):
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableInputTypeDateTime): Added.
+        (WebKit::WebRuntimeFeatures::isInputTypeDateTimeEnabled): Added.
+        (WebKit::WebRuntimeFeatures::enableInputTypeDateTimeLocal): Added.
+        (WebKit::WebRuntimeFeatures::isInputTypeDateTimeLocalEnabled): Added.
+        (WebKit::WebRuntimeFeatures::enableInputTypeMonth): Added.
+        (WebKit::WebRuntimeFeatures::isInputTypeMonthEnabled): Added.
+        (WebKit::WebRuntimeFeatures::enableInputTypeTime): Added.
+        (WebKit::WebRuntimeFeatures::isInputTypeTimeEnabled): Added.
+        (WebKit::WebRuntimeFeatures::enableInputTypeWeek): Added.
+        (WebKit::WebRuntimeFeatures::isInputTypeWeekEnabled): Added.
+
 2012-07-26  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r123799.

Modified: trunk/Source/WebKit/chromium/features.gypi (123825 => 123826)


--- trunk/Source/WebKit/chromium/features.gypi	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebKit/chromium/features.gypi	2012-07-27 01:27:06 UTC (rev 123826)
@@ -68,6 +68,11 @@
       'ENABLE_IFRAME_SEAMLESS=1',
       'ENABLE_INDEXED_DATABASE=1',
       'ENABLE_INPUT_TYPE_DATE=1',
+      'ENABLE_INPUT_TYPE_DATETIME=1',
+      'ENABLE_INPUT_TYPE_DATETIMELOCAL=1',
+      'ENABLE_INPUT_TYPE_MONTH=1',
+      'ENABLE_INPUT_TYPE_TIME=1',
+      'ENABLE_INPUT_TYPE_WEEK=1',
       'ENABLE_JAVASCRIPT_DEBUGGER=1',
       'ENABLE_LEGACY_CSS_VENDOR_PREFIXES=0',
       'ENABLE_LEGACY_VIEWPORT_ADAPTION=1',
@@ -143,11 +148,6 @@
           'ENABLE_CALENDAR_PICKER=0',
           'ENABLE_INPUT_SPEECH=0',
           'ENABLE_INPUT_TYPE_COLOR=0',
-          'ENABLE_INPUT_TYPE_DATETIME=1',
-          'ENABLE_INPUT_TYPE_DATETIMELOCAL=1',
-          'ENABLE_INPUT_TYPE_MONTH=1',
-          'ENABLE_INPUT_TYPE_TIME=1',
-          'ENABLE_INPUT_TYPE_WEEK=1',
           'ENABLE_JAVASCRIPT_I18N_API=0',
           'ENABLE_LEGACY_NOTIFICATIONS=0',
           'ENABLE_MEDIA_CAPTURE=1',

Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (123825 => 123826)


--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-07-27 01:27:06 UTC (rev 123826)
@@ -139,6 +139,21 @@
     WEBKIT_EXPORT static void enableInputTypeDate(bool);
     WEBKIT_EXPORT static bool isInputTypeDateEnabled();
 
+    WEBKIT_EXPORT static void enableInputTypeDateTime(bool);
+    WEBKIT_EXPORT static bool isInputTypeDateTimeEnabled();
+
+    WEBKIT_EXPORT static void enableInputTypeDateTimeLocal(bool);
+    WEBKIT_EXPORT static bool isInputTypeDateTimeLocalEnabled();
+
+    WEBKIT_EXPORT static void enableInputTypeMonth(bool);
+    WEBKIT_EXPORT static bool isInputTypeMonthEnabled();
+
+    WEBKIT_EXPORT static void enableInputTypeTime(bool);
+    WEBKIT_EXPORT static bool isInputTypeTimeEnabled();
+
+    WEBKIT_EXPORT static void enableInputTypeWeek(bool);
+    WEBKIT_EXPORT static bool isInputTypeWeekEnabled();
+
     WEBKIT_EXPORT static void enableDialogElement(bool);
     WEBKIT_EXPORT static bool isDialogElementEnabled();
 

Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (123825 => 123826)


--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-07-27 01:27:06 UTC (rev 123826)
@@ -531,6 +531,96 @@
 #endif
 }
 
+void WebRuntimeFeatures::enableInputTypeDateTime(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATETIME)
+    RuntimeEnabledFeatures::setInputTypeDateTimeEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeDateTimeEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATETIME)
+    return RuntimeEnabledFeatures::inputTypeDateTimeEnabled();
+#else
+    return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeDateTimeLocal(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+    RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeDateTimeLocalEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+    return RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled();
+#else
+    return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeMonth(bool enable)
+{
+#if ENABLE(INPUT_TYPE_MONTH)
+    RuntimeEnabledFeatures::setInputTypeMonthEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeMonthEnabled()
+{
+#if ENABLE(INPUT_TYPE_MONTH)
+    return RuntimeEnabledFeatures::inputTypeMonthEnabled();
+#else
+    return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeTime(bool enable)
+{
+#if ENABLE(INPUT_TYPE_TIME)
+    RuntimeEnabledFeatures::setInputTypeTimeEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeTimeEnabled()
+{
+#if ENABLE(INPUT_TYPE_TIME)
+    return RuntimeEnabledFeatures::inputTypeTimeEnabled();
+#else
+    return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableInputTypeWeek(bool enable)
+{
+#if ENABLE(INPUT_TYPE_WEEK)
+    RuntimeEnabledFeatures::setInputTypeWeekEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isInputTypeWeekEnabled()
+{
+#if ENABLE(INPUT_TYPE_WEEK)
+    return RuntimeEnabledFeatures::inputTypeWeekEnabled();
+#else
+    return false;
+#endif
+}
+
 void WebRuntimeFeatures::enableDialogElement(bool enable)
 {
 #if ENABLE(DIALOG_ELEMENT)

Modified: trunk/Tools/ChangeLog (123825 => 123826)


--- trunk/Tools/ChangeLog	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Tools/ChangeLog	2012-07-27 01:27:06 UTC (rev 123826)
@@ -1,3 +1,16 @@
+2012-07-26  Yoshifumi Inoue  <yo...@chromium.org>
+
+        [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
+        https://bugs.webkit.org/show_bug.cgi?id=92339
+
+        Reviewed by Kent Tamura.
+
+        This patch enables runtime features for input type datetime, datetime-local,
+        month, time and week for Chromium DRT.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell): Call enableInputType{DateTime,DateTimeLocal,Month,Time,Week}.
+
 2012-07-26  Jeffrey Pfau  <jp...@apple.com>
 
         Reloading substitute-data/alternate html string for unreachableURL will add an item to the back-forward-history for each reload

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (123825 => 123826)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-07-27 01:07:39 UTC (rev 123825)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-07-27 01:27:06 UTC (rev 123826)
@@ -122,6 +122,11 @@
     WebRuntimeFeatures::enableGeolocation(true);
     WebRuntimeFeatures::enablePointerLock(true);
     WebRuntimeFeatures::enableIndexedDatabase(true);
+    WebRuntimeFeatures::enableInputTypeDateTime(true);
+    WebRuntimeFeatures::enableInputTypeDateTimeLocal(true);
+    WebRuntimeFeatures::enableInputTypeMonth(true);
+    WebRuntimeFeatures::enableInputTypeTime(true);
+    WebRuntimeFeatures::enableInputTypeWeek(true);
     WebRuntimeFeatures::enableFileSystem(true);
     WebRuntimeFeatures::enableJavaScriptI18NAPI(true);
     WebRuntimeFeatures::enableMediaSource(true);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to