<?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>321939</bug_id>
          
          <creation_ts>2026-08-17 09:07:59 -0700</creation_ts>
          <short_desc>[EvaluationTimeZoom] px values in calc() expressions that survive through computed style are being serialized incorrectly</short_desc>
          <delta_ts>2026-08-17 16:50:13 -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 18</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Sam Weinig">sam</reporter>
          <assigned_to name="Sam Weinig">sam</assigned_to>
          <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2240977</commentid>
    <comment_count>0</comment_count>
      <attachid>481080</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-08-17 09:07:59 -0700</bug_when>
    <thetext>Created attachment 481080
Test case

px values in calc() expressions that survive through computed style are being unzoomed incorrectly. This used to be necessary, when computed values were zoomed, but with evaluation time zoom this is incorrect.

For example, given

```
  &lt;div id=foo style=&quot;zoom: 2; text-indent: calc(10% + 10px);&quot;&gt;&lt;/div&gt;
```

the following script:

```
window.getComputedStyle(document.getElementById(&quot;foo&quot;)).textIndent;
```

should print `calc(10% + 10px)` but instead prints `calc(10% + 5px)` (the px term is being incorrectly unscaled by the zoom).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2240984</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2026-08-17 09:22:37 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/71779</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2241185</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-08-17 16:49:04 -0700</bug_when>
    <thetext>Committed 319320@main (17e6d00a1924): &lt;https://commits.webkit.org/319320@main&gt;

Reviewed commits have been landed. Closing PR #71779 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2241187</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-08-17 16:50:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/185156231&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>481080</attachid>
            <date>2026-08-17 09:07:59 -0700</date>
            <delta_ts>2026-08-17 09:07:59 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>calc-zoom.html</filename>
            <type>text/html</type>
            <size>471</size>
            <attacher name="Sam Weinig">sam</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxtZXRhIGNoYXJzZXQ9IlVURi04Ij4KPHN0eWxlIGlkPXN0eWxlIHR5
cGU9InRleHQvY3NzIj4KICAjZm9vIHsgem9vbTogMjsgdGV4dC1pbmRlbnQ6IGNhbGMoMTAlICsg
MTBweCk7IH0KPC9zdHlsZT4KPHByZSBpZD1jb25zb2xlPjwvcHJlPgo8ZGl2IGlkPWZvbz48L2Rp
dj4KCjxzY3JpcHQ+CiAgY29uc3QgY29uc29sZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJj
b25zb2xlIik7CiAgY29uc3QgZm9vID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImZvbyIpOwog
IAogIGZ1bmN0aW9uIGxvZyhtc2cpCiAgewogICAgY29uc29sZS50ZXh0Q29udGVudCArPSBtc2cg
KyAiXG4iOwogIH0KICAKICBsb2coIlRoZSBuZXh0IGxpbmUgc2hvdWxkIHByaW50IGBjYWxjKDEw
JSArIDEwcHgpYDoiKQogIGxvZyh3aW5kb3cuZ2V0Q29tcHV0ZWRTdHlsZShmb28pLnRleHRJbmRl
bnQpOwo8L3NjcmlwdD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>