- Revision
- 191751
- Author
- [email protected]
- Date
- 2015-10-29 13:18:56 -0700 (Thu, 29 Oct 2015)
Log Message
Date input values should not overlap with menu list dropdown button on iOS
https://bugs.webkit.org/show_bug.cgi?id=150681
<rdar://problem/19965078>
Reviewed by Zalan Bujtas.
Source/WebCore:
Adds a right margin on iOS date and time inputs so that the inner div does
not render the value of the date on top of the dropdown button on the right
of the menu list.
Tests: fast/forms/date/date-input-rendering-basic.html
fast/forms/time/time-input-rendering-basic.html
* css/html.css:
(input::-webkit-date-and-time-value):
LayoutTests:
Tests that date and time inputs render properly. Namely, the text should not
be rendered such that it covers the dropdown button on the right of the menu
list.
* fast/forms/date/date-input-rendering-basic-expected.txt: Added.
* fast/forms/date/date-input-rendering-basic.html: Added.
* fast/forms/time/time-input-rendering-basic-expected.txt: Added.
* fast/forms/time/time-input-rendering-basic.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (191750 => 191751)
--- trunk/LayoutTests/ChangeLog 2015-10-29 20:09:57 UTC (rev 191750)
+++ trunk/LayoutTests/ChangeLog 2015-10-29 20:18:56 UTC (rev 191751)
@@ -1,3 +1,20 @@
+2015-10-29 Wenson Hsieh <[email protected]>
+
+ Date input values should not overlap with menu list dropdown button on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150681
+ <rdar://problem/19965078>
+
+ Reviewed by Zalan Bujtas.
+
+ Tests that date and time inputs render properly. Namely, the text should not
+ be rendered such that it covers the dropdown button on the right of the menu
+ list.
+
+ * fast/forms/date/date-input-rendering-basic-expected.txt: Added.
+ * fast/forms/date/date-input-rendering-basic.html: Added.
+ * fast/forms/time/time-input-rendering-basic-expected.txt: Added.
+ * fast/forms/time/time-input-rendering-basic.html: Added.
+
2015-10-29 Ryan Haddad <[email protected]>
storage/indexeddb/modern tests crashing frequently on mac-wk1, marking as flaky crashers
Added: trunk/LayoutTests/fast/forms/date/date-input-rendering-basic-expected.txt (0 => 191751)
--- trunk/LayoutTests/fast/forms/date/date-input-rendering-basic-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/date/date-input-rendering-basic-expected.txt 2015-10-29 20:18:56 UTC (rev 191751)
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderText {#text} at (101,2) size 4x19
+ text run at (101,2) width 4: " "
+ RenderText {#text} at (0,0) size 0x0
+layer at (10,10) size 97x22 clip at (11,11) size 95x20
+ RenderFlexibleBox {INPUT} at (2,2) size 97x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderBlock {DIV} at (6,4) size 57x14
+ RenderText {#text} at (0,0) size 57x14
+ text run at (0,0) width 57: "Apr 1, 1976"
+layer at (115,10) size 97x22 clip at (116,11) size 95x20
+ RenderFlexibleBox {INPUT} at (107,2) size 97x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderBlock {DIV} at (16,4) size 57x14
+ RenderText {#text} at (0,0) size 57x14
+ text run at (0,0) width 57: "Apr 1, 1976"
Added: trunk/LayoutTests/fast/forms/date/date-input-rendering-basic.html (0 => 191751)
--- trunk/LayoutTests/fast/forms/date/date-input-rendering-basic.html (rev 0)
+++ trunk/LayoutTests/fast/forms/date/date-input-rendering-basic.html 2015-10-29 20:18:56 UTC (rev 191751)
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <input type="date" dir="ltr" value="1976-04-01"></input>
+ <input type="date" dir="rtl" value="1976-04-01"></input>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/forms/time/time-input-rendering-basic-expected.txt (0 => 191751)
--- trunk/LayoutTests/fast/forms/time/time-input-rendering-basic-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/forms/time/time-input-rendering-basic-expected.txt 2015-10-29 20:18:56 UTC (rev 191751)
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderText {#text} at (82,2) size 4x19
+ text run at (82,2) width 4: " "
+ RenderText {#text} at (0,0) size 0x0
+layer at (10,10) size 78x22 clip at (11,11) size 76x20
+ RenderFlexibleBox {INPUT} at (2,2) size 78x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderBlock {DIV} at (6,4) size 41x14
+ RenderText {#text} at (0,0) size 41x14
+ text run at (0,0) width 41: "9:41 AM"
+layer at (96,10) size 78x22 clip at (97,11) size 76x20
+ RenderFlexibleBox {INPUT} at (88,2) size 78x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+ RenderBlock {DIV} at (13,4) size 41x14
+ RenderText {#text} at (0,0) size 41x14
+ text run at (0,0) width 17: "AM"
+ text run at (16,0) width 4 RTL: " "
+ text run at (19,0) width 22: "9:41"
Added: trunk/LayoutTests/fast/forms/time/time-input-rendering-basic.html (0 => 191751)
--- trunk/LayoutTests/fast/forms/time/time-input-rendering-basic.html (rev 0)
+++ trunk/LayoutTests/fast/forms/time/time-input-rendering-basic.html 2015-10-29 20:18:56 UTC (rev 191751)
@@ -0,0 +1,6 @@
+<html>
+ <body>
+ <input type="time" dir="ltr" value="09:41:00"></input>
+ <input type="time" dir="rtl" value="09:41:00"></input>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (191750 => 191751)
--- trunk/Source/WebCore/ChangeLog 2015-10-29 20:09:57 UTC (rev 191750)
+++ trunk/Source/WebCore/ChangeLog 2015-10-29 20:18:56 UTC (rev 191751)
@@ -1,3 +1,21 @@
+2015-10-29 Wenson Hsieh <[email protected]>
+
+ Date input values should not overlap with menu list dropdown button on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150681
+ <rdar://problem/19965078>
+
+ Reviewed by Zalan Bujtas.
+
+ Adds a right margin on iOS date and time inputs so that the inner div does
+ not render the value of the date on top of the dropdown button on the right
+ of the menu list.
+
+ Tests: fast/forms/date/date-input-rendering-basic.html
+ fast/forms/time/time-input-rendering-basic.html
+
+ * css/html.css:
+ (input::-webkit-date-and-time-value):
+
2015-10-29 Alex Christensen <[email protected]>
Fix Mac CMake build
Modified: trunk/Source/WebCore/css/html.css (191750 => 191751)
--- trunk/Source/WebCore/css/html.css 2015-10-29 20:09:57 UTC (rev 191750)
+++ trunk/Source/WebCore/css/html.css 2015-10-29 20:18:56 UTC (rev 191751)
@@ -526,12 +526,14 @@
#endif
#endif
-#if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
input::-webkit-date-and-time-value {
+#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
+ margin-right: 18px;
+#else
margin: 1px 24px 1px 4px;
white-space: pre;
+#endif
}
-#endif
input::-webkit-inner-spin-button {
-webkit-appearance: inner-spin-button;