Input[type=date] draws spin button and spin button works
authorRyuan Choi <ryuan.choi@samsung.com>
Mon, 12 Aug 2013 10:17:49 +0000 (19:17 +0900)
committerRyuan Choi <ryuan.choi@samsung.com>
Thu, 22 Aug 2013 01:56:27 +0000 (10:56 +0900)
[Title] Input[type=date] draws spin button and spin button works
[Issue#] P130802-2960 , P130819-04322
[Problem] In mobile, spin button make wrong action while pressing date type with opening picker.
[Cause] Current logic is based on textfield and DateInputType used spin behavior.
[Solution] Disable spin behavior and added menu list style for all date/time type.

Change-Id: I65f7b676e25a1056713c89cfbe5d0024f05e95be

Source/WebCore/css/html.css
Source/WebCore/html/BaseDateAndTimeInputType.cpp

index e5ad78c..504d09d 100755 (executable)
@@ -471,6 +471,43 @@ datalist {
 }
 #endif
 
+#if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE
+input[type="date"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) && ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE
+input[type="datetime"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && ENABLE_INPUT_TYPE_DATETIMELOCAL
+input[type="datetime-local"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_MONTH) && ENABLE_INPUT_TYPE_MONTH
+input[type="month"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_TIME) && ENABLE_INPUT_TYPE_TIME
+input[type="time"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+#if defined(ENABLE_INPUT_TYPE_WEEK) && ENABLE_INPUT_TYPE_WEEK
+input[type="week"] {
+    -webkit-appearance: menulist;
+    -webkit-box-sizing: border-box;
+}
+#endif
+
 input::-webkit-inner-spin-button {
     -webkit-appearance: inner-spin-button;
     display: block;
index d0d4f26..adb97ff 100644 (file)
@@ -96,7 +96,7 @@ Decimal BaseDateAndTimeInputType::defaultValueForStepUp() const
 
 bool BaseDateAndTimeInputType::isSteppable() const
 {
-    return true;
+    return false;
 }
 
 void BaseDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* event)