Fix font for date/time input types.
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2012 06:24:56 +0000 (06:24 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Oct 2012 06:24:56 +0000 (06:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98478

Reviewed by Kentaro Hara.

input[type=date] should use monospace font if
ENABLE_INPUT_MULTIPLE_FIELDS_UI && ENABLE_INPUT_TYPE_DATE.

For other date/time types, they should use monospace font only
if their types are enabled. input[type="foo"] matches input
element with type="foo" even if the foo type is not supported.

The input[type=date] change is covered by
fast/forms/date/calendar-picker-appearance.html,
platform/chromium/fast/forms/date/date-suggestion-picker-appearance*.html

* css/html.css:
(input[type="date"]):
(input[type="datetime"]):
(input[type="datetime-local"]):
(input[type="month"]):
(input[type="time"]):

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

Source/WebCore/ChangeLog
Source/WebCore/css/html.css

index 94b7ec5..6c40759 100644 (file)
@@ -1,3 +1,28 @@
+2012-10-04  Kent Tamura  <tkent@chromium.org>
+
+        Fix font for date/time input types.
+        https://bugs.webkit.org/show_bug.cgi?id=98478
+
+        Reviewed by Kentaro Hara.
+
+        input[type=date] should use monospace font if
+        ENABLE_INPUT_MULTIPLE_FIELDS_UI && ENABLE_INPUT_TYPE_DATE.
+
+        For other date/time types, they should use monospace font only
+        if their types are enabled. input[type="foo"] matches input
+        element with type="foo" even if the foo type is not supported.
+
+        The input[type=date] change is covered by
+        fast/forms/date/calendar-picker-appearance.html,
+        platform/chromium/fast/forms/date/date-suggestion-picker-appearance*.html
+
+        * css/html.css:
+        (input[type="date"]):
+        (input[type="datetime"]):
+        (input[type="datetime-local"]):
+        (input[type="month"]):
+        (input[type="time"]):
+
 2012-10-04  Hajime Morrita  <morrita@google.com>
 
         [Refactoring] Some classes in StyleResolver.cpp/h could have its own file.
index 6d63c22..1f455d8 100644 (file)
@@ -477,13 +477,36 @@ datalist {
 #endif
 
 #if defined(ENABLE_INPUT_MULTIPLE_FIELDS_UI) && ENABLE_INPUT_MULTIPLE_FIELDS_UI
-input[type="datetime"],
-input[type="datetime-local"],
-input[type="month"],
-input[type="time"],
+#if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE
+input[type="date"] {
+    font-family: monospace;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_DATETIME) && ENABLE_INPUT_TYPE_DATETIME
+input[type="datetime"] {
+    font-family: monospace;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && ENABLE_INPUT_TYPE_DATETIMELOCAL
+input[type="datetime-local"] {
+    font-family: monospace;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_MONTH) && ENABLE_INPUT_TYPE_MONTH
+input[type="month"] {
+    font-family: monospace;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_TIME) && ENABLE_INPUT_TYPE_TIME
+input[type="time"] {
+    font-family: monospace;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_WEEK) && ENABLE_INPUT_TYPE_WEEK
 input[type="week"] {
     font-family: monospace;
 }
+#endif
 
 input::-webkit-datetime-edit {
     -webkit-user-modify: read-only !important;