<?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>237616</bug_id>
          
          <creation_ts>2022-03-08 12:37:45 -0800</creation_ts>
          <short_desc>WebKit doesn&apos;t properly scale &apos;shape-outside&apos; image area on floats</short_desc>
          <delta_ts>2022-03-10 10:18:09 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Daniel Holbert">dholbert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1849368</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2022-03-08 12:37:45 -0800</bug_when>
    <thetext>(note: this same bug exists in WebKit and Chromium. The Chromium version of this bug report is at https://bugs.chromium.org/p/chromium/issues/detail?id=1304373 .)

What steps will reproduce the problem?
(1) Load https://bugzilla.mozilla.org/attachment.cgi?id=9266906

What is the expected result?
The &quot;abc&quot; text should be at the right edge of the black area on each line.

What happens instead?
The &quot;abc&quot; text is at the same position on the first 3 lines, and at a different position but still too-far-to-the-right on the 4th line.

Firefox gives the expected result here.  Chrome and Safari (Chromium/Blink + WebKit) give the above-described result which I&apos;m pretty sure is incorrect.

The relevant spec text is here, in the css-shapes-1 spec (where shape-outside is defined):
https://www.w3.org/TR/css-shapes-1/#shapes-from-image

Quoting:
&gt; The image is sized and positioned as if it were a replaced element whose specified width and height are the same as the element’s used content box size. 

In my testcase, I&apos;ve included a replaced element (`&lt;img&gt;`) of that size on each line, so that you can see the proper size/position of the shape-outside image.

Firefox seems to honor this spec text, whereas Chromium/WebKit don&apos;t seem to resize the shape-outside image at all, as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1849371</commentid>
    <comment_count>1</comment_count>
      <attachid>454144</attachid>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2022-03-08 12:38:24 -0800</bug_when>
    <thetext>Created attachment 454144
testcase

Here&apos;s a copy of the testcase that I linked in the initial comment, BTW.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1850157</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-10 10:18:09 -0800</bug_when>
    <thetext>&lt;rdar://problem/90106520&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>454144</attachid>
            <date>2022-03-08 12:38:24 -0800</date>
            <delta_ts>2022-03-08 12:38:24 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>1667</size>
            <attacher name="Daniel Holbert">dholbert</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8bWV0YSBjaGFyc2V0PSJ1dGYtOCIvPgog
IDx0aXRsZT5UZXN0PC90aXRsZT4KICA8c3R5bGU+CiAgYm9keSB7IGNvbG9yOiBmdWNoc2lhOyB9
CiAgLnNoYXBlIHsKICAgIGhlaWdodDogMTBwe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