<?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>192665</bug_id>
          
          <creation_ts>2018-12-13 07:58:27 -0800</creation_ts>
          <short_desc>Resolved value for the &apos;width&apos; and &apos;height&apos; properties on SVG &lt;rect&gt;, &lt;image&gt;, &lt;svg&gt; and &lt;foreignObject&gt; should be the &quot;used value&quot;</short_desc>
          <delta_ts>2026-05-26 00:27:04 -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>SVG</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>FromImplementor, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fredrik Söderquist">fs</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>krit</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1487582</commentid>
    <comment_count>0</comment_count>
    <who name="Fredrik Söderquist">fs</who>
    <bug_when>2018-12-13 07:58:27 -0800</bug_when>
    <thetext>As defined by CSSOM:

https://drafts.csswg.org/cssom/#resolved-values

Simple testcase can be found in bugs.chromium.org/p/chromium/issues/detail?id=772707 (and hopefully soonish in WPT).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880250</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-01 16:15:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/96320059&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2174854</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-01-24 23:01:29 -0800</bug_when>
    <thetext>template&lt;CSSPropertyID propertyID&gt; struct PreferredSizeSharedAdaptor {
    template&lt;typename F&gt; decltype(auto) computedValue(ExtractorState&amp; state, const PreferredSize&amp; value, F&amp;&amp; functor) const
    {
        auto sizingBox = [](auto&amp; renderer) -&gt; LayoutRect {
            auto* box = dynamicDowncast&lt;RenderBox&gt;(renderer);
            if (!box)
                return LayoutRect();
            return box-&gt;style().boxSizing() == BoxSizing::BorderBox ? box-&gt;borderBoxRect() : box-&gt;computedCSSContentBoxRect();
        };

        auto isNonReplacedInline = [](auto&amp; renderer) {
            return renderer.isInline() &amp;&amp; !renderer.isBlockLevelReplacedOrAtomicInline();
        };

        if (state.renderer &amp;&amp; !state.renderer-&gt;isRenderOrLegacyRenderSVGModelObject()) {
            // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property,
            // the &quot;height&quot; property does not apply for non-replaced inline elements.
            if (!isNonReplacedInline(*state.renderer)) {
                if constexpr (propertyID == CSSPropertyHeight)
                    return functor(Length&lt;&gt; { sizingBox(*state.renderer).height() });
                else if constexpr (propertyID == CSSPropertyWidth)
                    return functor(Length&lt;&gt; { sizingBox(*state.renderer).width() });
            }
        }
        return functor(value);
    }
};

Might be need to add something specific for SVG here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190619</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-03-16 09:16:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60701</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213953</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-25 17:32:03 -0700</bug_when>
    <thetext>Committed 313859@main (58f3b64ab992): &lt;https://commits.webkit.org/313859@main&gt;

Reviewed commits have been landed. Closing PR #60701 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2214041</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-05-26 00:27:04 -0700</bug_when>
    <thetext>*** Bug 296024 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>