<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>236108</bug_id>
          
          <creation_ts>2022-02-03 15:40:45 -0800</creation_ts>
          <short_desc>line-height: 1px on &lt;input type=search&gt; is not reflected in getComputedStyle()</short_desc>
          <delta_ts>2023-05-25 21:49:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=203751</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1837147</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2022-02-03 15:40:45 -0800</bug_when>
    <thetext>What steps will reproduce the problem?
(1) Apply a &apos;line-height&apos; that is smaller than &apos;normal&apos; on &lt;input type=search&gt;
(2) Call getComputedStyle(input).lineHeight
(3)

What is the expected result?
1px

What happens instead?
assert_equals: expected &quot;1px&quot; but got &quot;normal&quot;

There&apos;s some magic for text entry widgets to change the used value of &apos;line-height&apos; to &apos;normal&apos; if it was smaller than &apos;normal&apos;, but the computed value should not be affected by this. Only used value.

This doesn&apos;t happen with the type=text, type=url, type=email, type=password.

Spec change: https://github.com/whatwg/html/pull/5462
Test: https://github.com/web-platform-tests/wpt/pull/32684

(Maybe related: https://bugs.webkit.org/show_bug.cgi?id=203751 )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1837299</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2022-02-04 00:47:25 -0800</bug_when>
    <thetext>dholbert pointed out that the test was incorrect, since getComputedStyle returns the resolved value, which for line-height will be the used value. So the used value should be something like 16px (depending on font metrics). I&apos;ve now fixed the test.

I also tested computedStyleMap() although it seems it is not yet supported in WebKit. (https://bugs.webkit.org/show_bug.cgi?id=175733)

This bug thus applies to all text entry widgets, although &lt;input type=search&gt; is different from the others and returns &apos;normal&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1837631</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-04 16:15:31 -0800</bug_when>
    <thetext>&lt;rdar://problem/88513265&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>