Changeset 258906 in webkit


Ignore:
Timestamp:
Mar 23, 2020 9:48:49 PM (4 years ago)
Author:
Alan Bujtas
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.
Location:
trunk
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r258903 r258906  
     12020-03-23  Zalan Bujtas  <zalan@apple.com>
     2
     3        becu.org: Placeholder text "Search" is cut off
     4        https://bugs.webkit.org/show_bug.cgi?id=209447
     5        <rdar://problem/45951728>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/forms/placeholder-content-center-expected.html:
     10        * fast/forms/placeholder-content-center.html:
     11        * fast/forms/placeholder-content-line-height-expected.html: Copied from LayoutTests/fast/forms/placeholder-content-center-expected.html.
     12        * fast/forms/placeholder-content-line-height.html: Copied from LayoutTests/fast/forms/placeholder-content-center.html.
     13
    1142020-03-23  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/LayoutTests/fast/forms/placeholder-content-center-expected.html

    r258806 r258906  
    11<style>
    22div {
    3   padding-top: 9px;
     3  padding-top: 7px;
    44  padding-left: 1px;
    55
    66  color: black;
    77
    8   font-size: 20px;
     8  font-size: 22px;
    99  font-style: normal;
    1010  font-weight: 400;
  • trunk/LayoutTests/fast/forms/placeholder-content-center.html

    r258806 r258906  
    1111::placeholder {
    1212  color: black;
    13   font-size: 20px;
     13  font-size: 22px;
    1414}
    1515</style>
  • trunk/LayoutTests/fast/forms/placeholder-content-line-height-expected.html

    r258905 r258906  
    11<style>
    22div {
    3   padding-top: 9px;
     3  padding-top: 7px;
    44  padding-left: 1px;
    55
    66  color: black;
    77
    8   font-size: 20px;
     8  font-size: 22px;
    99  font-style: normal;
    1010  font-weight: 400;
  • trunk/LayoutTests/fast/forms/placeholder-content-line-height.html

    r258905 r258906  
    55  width: 600px;
    66  border: none;
    7   color: black;
    8   font-size: 10px;
     7  font-size: 22px;
    98}
    109
    1110::placeholder {
    1211  color: black;
    13   font-size: 20px;
    1412}
    1513</style>
    16 <input placeholder="PASS if placeholder text is fully visible">
     14<input placeholder="PASS if placeholder text is fully visible" type="text">
  • trunk/LayoutTests/platform/ios/TestExpectations

    r258884 r258906  
    639639fast/forms/type-after-focus-rule-shrink-width.html [ Skip ]
    640640fast/forms/placeholder-content-center.html [ Skip ]
     641fast/forms/placeholder-content-line-height.html [ Skip ]
    641642fast/frames/frame-deep-nested-resize.html [ Skip ]
    642643fast/frames/frame-set-rotation-hit.html [ Skip ]
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt

    r202826 r258906  
    100100    RenderText {#text} at (0,6) size 29x13
    101101      text run at (0,6) width 29: "Value"
    102 layer at (167,267) size 140x25
    103   RenderBlock {DIV} at (3,3) size 140x25 [color=#A9A9A9]
    104     RenderText {#text} at (0,6) size 62x13
    105       text run at (0,6) width 62: "placeholder"
     102layer at (167,273) size 140x13
     103  RenderBlock {DIV} at (3,9) size 140x13 [color=#A9A9A9]
     104    RenderText {#text} at (0,0) size 62x13
     105      text run at (0,0) width 62: "placeholder"
    106106layer at (167,267) size 140x25
    107107  RenderBlock {DIV} at (3,3) size 140x25
  • trunk/LayoutTests/platform/win/TestExpectations

    r258892 r258906  
    21442144# Search fields do change in size. May be correct behavior
    21452145fast/forms/searchfield-heights.html [ Failure ]
    2146 fast/forms/placeholder-content-center.html [ Failure ]
     2146fast/forms/placeholder-content-center.html [ ImageOnlyFailure ]
     2147fast/forms/placeholder-content-line-height.html [ ImageOnlyFailure ]
    21472148
    21482149# Test uses "required" form element property which currently does not work on Safari
  • trunk/Source/WebCore/ChangeLog

    r258905 r258906  
     12020-03-23  Zalan Bujtas  <zalan@apple.com>
     2
     3        becu.org: Placeholder text "Search" is cut off
     4        https://bugs.webkit.org/show_bug.cgi?id=209447
     5        <rdar://problem/45951728>
     6
     7        Reviewed by Simon Fraser.
     8
     9        'line-height: initial' ensures that that the placeholder text is visible and properly positioned when the input itself has
     10        incompatible values. This is also what Chrome has in their UA stylesheet.
     11
     12        Test: fast/forms/placeholder-content-line-height.html
     13
     14        * css/html.css:
     15        (input::placeholder):
     16
    1172020-03-23  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/css/html.css

    r250788 r258906  
    703703    word-wrap: normal;
    704704    overflow: hidden;
     705    line-height: initial;
    705706}
    706707
Note: See TracChangeset for help on using the changeset viewer.