<?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>299816</bug_id>
          
          <creation_ts>2025-09-29 12:40:52 -0700</creation_ts>
          <short_desc>[CSS ZOOM] Zoom evaluation-time flag causes double zoom on border-width with em units</short_desc>
          <delta_ts>2025-10-17 20:12:53 -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>WebKit Nightly Build</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="Taher">taher_ali</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2146920</commentid>
    <comment_count>0</comment_count>
    <who name="Taher">taher_ali</who>
    <bug_when>2025-09-29 12:40:52 -0700</bug_when>
    <thetext>After PR #51076 is merged, we need to investigate and fix failures in tests such as:

LayoutTests/fast/sub-pixel/zoomed-em-border.html


The flag introduced in the PR #51076 enables applying zoom at evaluation time instead of style-build time. The goal is to move zoom application from style building into layout/rendering, and the feature flag is meant to prevent zoom from being applied during style building to avoid double zooming.

However, what currently happens is:

- The em unit on border-width is being resolved against the computed font size rather than the specified size
- The computed font size already includes the zoom factor
- When zoom is applied again during evaluation time to the border-width, it causes double zooming


To address this, I modified font size computation at style-build time in computedFontSizeFromSpecifiedSize. I skipped applying zoom if the evaluation-time flag was enabled. 

This fixes the double zoom issue for border-width with font-related units but a new problem gets introduced: text itself is no longer zoom-induced as expected. This breaks assumptions in other parts of the engine where the computed font size is expected to already include zoom.

Could this change also break other assumptions that rely on zoomed computed font sizes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2146921</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-09-29 12:40:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/161590209&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149830</commentid>
    <comment_count>2</comment_count>
    <who name="Vitor Roriz">vitor.roriz</who>
    <bug_when>2025-10-09 17:00:36 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/52094</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2150745</commentid>
    <comment_count>3</comment_count>
    <who name="Taher">taher_ali</who>
    <bug_when>2025-10-13 22:28:03 -0700</bug_when>
    <thetext>investigate: LayoutTests/svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152288</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-10-17 20:12:51 -0700</bug_when>
    <thetext>Committed 301757@main (4082642c7f1c): &lt;https://commits.webkit.org/301757@main&gt;

Reviewed commits have been landed. Closing PR #52094 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>