<?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>240128</bug_id>
          
          <creation_ts>2022-05-05 10:57:10 -0700</creation_ts>
          <short_desc>WebKit improperly overlaps a BFC with a float, with certain margin values</short_desc>
          <delta_ts>2022-05-12 10:58:12 -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>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>
          
          <see_also>https://bugs.chromium.org/p/chromium/issues/detail?id=1322774</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=239976</see_also>
          <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>1866915</commentid>
    <comment_count>0</comment_count>
      <attachid>458892</attachid>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2022-05-05 10:57:10 -0700</bug_when>
    <thetext>Created attachment 458892
testcase 1

STR:
1. Load attached testcase.

EXPECTED RESULTS:
The blue area and the fuchsia area should **not be overlapping**.

ACTUAL RESULTS:
The blue bordered area overlaps the fuchsia area.

There are various pieces of CSS Float layout that are vague or undefined, but one clear requirement is (emphasis added by me):
&gt; The border box of [...] an element in the normal flow that establishes a new block formatting context [...] **must not overlap the margin box of any floats in the same block formatting context as the element itself.** If necessary, implementations should clear the said element by placing it below any preceding floats, but may place it adjacent to such floats if there is sufficient space.

https://www.w3.org/TR/CSS21/visuren.html#floats

WebKit is violating this requirement here.

Chromium/Blink has the same bug, which is filed as https://bugs.chromium.org/p/chromium/issues/detail?id=1322774

Firefox gives EXPECTED RESULTS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868481</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-12 10:58:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/93187697&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>458892</attachid>
            <date>2022-05-05 10:57:10 -0700</date>
            <delta_ts>2022-05-05 10:57:10 -0700</delta_ts>
            <desc>testcase 1</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>445</size>
            <attacher name="Daniel Holbert">dholbert</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT4KLmNvbnRhaW5lciB7CiAgd2lkdGg6IDEwMHB4OwogIGhl
aWdodDogNDBweDsKICBib3JkZXI6IDFweCBzb2xpZCBncmF5Owp9CgouZmxvYXQgewogIGZsb2F0
OiByaWdodDsKICB3aWR0aDogNTBweDsKICBoZWlnaHQ6IDhweDsKICBiYWNrZ3JvdW5kOiBmdWNo
c2lhOwogIGJvcmRlcjogMXB4IHNvbGlkIHB1cnBsZTsKICBtYXJnaW46IDNweDsKfQoKLmJmYyB7
CiAgd2lkdGg6IDMwcHg7CiAgaGVpZ2h0OiAxNXB4OwogIGRpc3BsYXk6IGZsb3ctcm9vdDsKICBi
YWNrZ3JvdW5kOiBhcXVhOwogIGJvcmRlcjogMXB4IHNvbGlkIGJsdWU7CiAgbWFyZ2luLWxlZnQ6
IDYwcHg7Cn0KPC9zdHlsZT4KPGRpdiBjbGFzcz0iY29udGFpbmVyIj4KICA8ZGl2IGNsYXNzPSJm
bG9hdCI+PC9kaXY+CiAgPGRpdiBjbGFzcz0iYmZjIj48L2Rpdj4KPC9kaXY+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>