Title: [258906] trunk
Revision
258906
Author
za...@apple.com
Date
2020-03-23 21:48:49 -0700 (Mon, 23 Mar 2020)

Log Message

becu.org: Placeholder text "Search" is cut off
https://bugs.webkit.org/show_bug.cgi?id=209447
<rdar://problem/45951728>

Reviewed by Simon Fraser.

Source/WebCore:

'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
incompatible values. This is also what Chrome has in their UA stylesheet.

Test: fast/forms/placeholder-content-line-height.html

* css/html.css:
(input::placeholder):

LayoutTests:

* fast/forms/placeholder-content-center-expected.html:
* fast/forms/placeholder-content-center.html:
* fast/forms/placeholder-content-line-height-expected.html: Copied from LayoutTests/fast/forms/placeholder-content-center-expected.html.
* fast/forms/placeholder-content-line-height.html: Copied from LayoutTests/fast/forms/placeholder-content-center.html.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (258905 => 258906)


--- trunk/LayoutTests/ChangeLog	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/ChangeLog	2020-03-24 04:48:49 UTC (rev 258906)
@@ -1,3 +1,16 @@
+2020-03-23  Zalan Bujtas  <za...@apple.com>
+
+        becu.org: Placeholder text "Search" is cut off
+        https://bugs.webkit.org/show_bug.cgi?id=209447
+        <rdar://problem/45951728>
+
+        Reviewed by Simon Fraser.
+
+        * fast/forms/placeholder-content-center-expected.html:
+        * fast/forms/placeholder-content-center.html:
+        * fast/forms/placeholder-content-line-height-expected.html: Copied from LayoutTests/fast/forms/placeholder-content-center-expected.html.
+        * fast/forms/placeholder-content-line-height.html: Copied from LayoutTests/fast/forms/placeholder-content-center.html.
+
 2020-03-23  Simon Fraser  <simon.fra...@apple.com>
 
         [ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.

Modified: trunk/LayoutTests/fast/forms/placeholder-content-center-expected.html (258905 => 258906)


--- trunk/LayoutTests/fast/forms/placeholder-content-center-expected.html	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/fast/forms/placeholder-content-center-expected.html	2020-03-24 04:48:49 UTC (rev 258906)
@@ -1,11 +1,11 @@
 <style>
 div {
-  padding-top: 9px;
+  padding-top: 7px;
   padding-left: 1px;
 
   color: black;
 
-  font-size: 20px;
+  font-size: 22px;
   font-style: normal;
   font-weight: 400;
   font-family: system-ui;

Modified: trunk/LayoutTests/fast/forms/placeholder-content-center.html (258905 => 258906)


--- trunk/LayoutTests/fast/forms/placeholder-content-center.html	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/fast/forms/placeholder-content-center.html	2020-03-24 04:48:49 UTC (rev 258906)
@@ -10,7 +10,7 @@
 
 ::placeholder {
   color: black;
-  font-size: 20px;
+  font-size: 22px;
 }
 </style>
 <input placeholder="PASS if placeholder text is fully visible">

Copied: trunk/LayoutTests/fast/forms/placeholder-content-line-height-expected.html (from rev 258905, trunk/LayoutTests/fast/forms/placeholder-content-center-expected.html) (0 => 258906)


--- trunk/LayoutTests/fast/forms/placeholder-content-line-height-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/placeholder-content-line-height-expected.html	2020-03-24 04:48:49 UTC (rev 258906)
@@ -0,0 +1,15 @@
+<style>
+div {
+  padding-top: 7px;
+  padding-left: 1px;
+
+  color: black;
+
+  font-size: 22px;
+  font-style: normal;
+  font-weight: 400;
+  font-family: system-ui;
+  font-variant-caps: normal;
+}
+</style>
+<div>PASS if placeholder text is fully visible</div>

Copied: trunk/LayoutTests/fast/forms/placeholder-content-line-height.html (from rev 258905, trunk/LayoutTests/fast/forms/placeholder-content-center.html) (0 => 258906)


--- trunk/LayoutTests/fast/forms/placeholder-content-line-height.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/placeholder-content-line-height.html	2020-03-24 04:48:49 UTC (rev 258906)
@@ -0,0 +1,14 @@
+<style>
+input {
+  -webkit-appearance: none;
+  height: 40px;
+  width: 600px;
+  border: none;
+  font-size: 22px;
+}
+
+::placeholder {
+  color: black;
+}
+</style>
+<input placeholder="PASS if placeholder text is fully visible" type="text">

Modified: trunk/LayoutTests/platform/ios/TestExpectations (258905 => 258906)


--- trunk/LayoutTests/platform/ios/TestExpectations	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2020-03-24 04:48:49 UTC (rev 258906)
@@ -638,6 +638,7 @@
 fast/forms/textfield-inside-anchor.html [ Skip ]
 fast/forms/type-after-focus-rule-shrink-width.html [ Skip ]
 fast/forms/placeholder-content-center.html [ Skip ]
+fast/forms/placeholder-content-line-height.html [ Skip ]
 fast/frames/frame-deep-nested-resize.html [ Skip ]
 fast/frames/frame-set-rotation-hit.html [ Skip ]
 fast/frames/frame-set-scaling-hit.html [ Skip ]

Modified: trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt (258905 => 258906)


--- trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt	2020-03-24 04:48:49 UTC (rev 258906)
@@ -99,11 +99,11 @@
   RenderBlock {DIV} at (3,3) size 140x25
     RenderText {#text} at (0,6) size 29x13
       text run at (0,6) width 29: "Value"
+layer at (167,273) size 140x13
+  RenderBlock {DIV} at (3,9) size 140x13 [color=#A9A9A9]
+    RenderText {#text} at (0,0) size 62x13
+      text run at (0,0) width 62: "placeholder"
 layer at (167,267) size 140x25
-  RenderBlock {DIV} at (3,3) size 140x25 [color=#A9A9A9]
-    RenderText {#text} at (0,6) size 62x13
-      text run at (0,6) width 62: "placeholder"
-layer at (167,267) size 140x25
   RenderBlock {DIV} at (3,3) size 140x25
 layer at (13,302) size 140x13
   RenderBlock {DIV} at (3,3) size 140x13

Modified: trunk/LayoutTests/platform/win/TestExpectations (258905 => 258906)


--- trunk/LayoutTests/platform/win/TestExpectations	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-03-24 04:48:49 UTC (rev 258906)
@@ -2143,7 +2143,8 @@
 
 # Search fields do change in size. May be correct behavior
 fast/forms/searchfield-heights.html [ Failure ]
-fast/forms/placeholder-content-center.html [ Failure ]
+fast/forms/placeholder-content-center.html [ ImageOnlyFailure ]
+fast/forms/placeholder-content-line-height.html [ ImageOnlyFailure ]
 
 # Test uses "required" form element property which currently does not work on Safari
 fast/forms/validation-message-user-modify.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (258905 => 258906)


--- trunk/Source/WebCore/ChangeLog	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/Source/WebCore/ChangeLog	2020-03-24 04:48:49 UTC (rev 258906)
@@ -1,3 +1,19 @@
+2020-03-23  Zalan Bujtas  <za...@apple.com>
+
+        becu.org: Placeholder text "Search" is cut off
+        https://bugs.webkit.org/show_bug.cgi?id=209447
+        <rdar://problem/45951728>
+
+        Reviewed by Simon Fraser.
+
+        'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
+        incompatible values. This is also what Chrome has in their UA stylesheet.
+
+        Test: fast/forms/placeholder-content-line-height.html
+
+        * css/html.css:
+        (input::placeholder):
+
 2020-03-23  Simon Fraser  <simon.fra...@apple.com>
 
         [mac-wk1] fast/scrolling/arrow-key-scroll-in-rtl-document.html is a flaky timeout

Modified: trunk/Source/WebCore/css/html.css (258905 => 258906)


--- trunk/Source/WebCore/css/html.css	2020-03-24 04:17:19 UTC (rev 258905)
+++ trunk/Source/WebCore/css/html.css	2020-03-24 04:48:49 UTC (rev 258906)
@@ -702,6 +702,7 @@
     white-space: pre;
     word-wrap: normal;
     overflow: hidden;
+    line-height: initial;
 }
 
 input[type="password"] {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to