<?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>252075</bug_id>
          
          <creation_ts>2023-02-10 14:09:24 -0800</creation_ts>
          <short_desc>Zoom level factored into computed value of lh (line-height) unit used in CSS gradient</short_desc>
          <delta_ts>2024-07-22 23:38:05 -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>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>275399</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dan">dan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
    
    <cc>karlcow</cc>
    
    <cc>koivisto</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1932750</commentid>
    <comment_count>0</comment_count>
      <attachid>464947</attachid>
    <who name="Dan">dan</who>
    <bug_when>2023-02-10 14:09:24 -0800</bug_when>
    <thetext>Created attachment 464947
A demonstration of how 1lh changes as you zoom in and out of the page

When used in a linear-gradient() CSS image, the computed value of `1lh` incorrectly changes based on zoom level.

In the attached test case, the paragraph has these styles:

p {
  line-height: 1.3;
  font-size: 20px;
  padding: 1lh;
  margin: 1lh;
  border: 1px solid;
  background-image: linear-gradient(
    transparent 0 1lh,
    #fc0 1lh 2lh,
    transparent 2lh 100%
  );
}

Zooming in and out of the page, the `margin` and `padding` are computed to `26px`, but the background image that highlights the first line of the paragraph gets out of sync.

The issue is not present in Chrome 109+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1933134</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-02-13 01:41:58 -0800</bug_when>
    <thetext>&lt;rdar://problem/105383208&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2047703</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-07-22 23:37:14 -0700</bug_when>
    <thetext>This bug seems to be aleady fixed by someone.

280062@main bad
280183@main good</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2047704</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-07-22 23:38:05 -0700</bug_when>
    <thetext>Likely 280120@main

*** This bug has been marked as a duplicate of bug 275399 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>464947</attachid>
            <date>2023-02-10 14:09:24 -0800</date>
            <delta_ts>2023-02-10 14:09:24 -0800</delta_ts>
            <desc>A demonstration of how 1lh changes as you zoom in and out of the page</desc>
            <filename>1lh.html</filename>
            <type>text/html</type>
            <size>913</size>
            <attacher name="Dan">dan</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9J2VuJz4KPGhlYWQ+Cgk8bWV0YSBjaGFyc2V0PSJ1
dGYtOCI+Cgk8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRo
LCBpbml0aWFsLXNjYWxlPTEiPgoJPHRpdGxlPmNvbXB1dGVkIHZhbHVl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