Bug 240128

Summary: WebKit improperly overlaps a BFC with a float, with certain margin values
Product: WebKit Reporter: Daniel Holbert <dholbert>
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.chromium.org/p/chromium/issues/detail?id=1322774
https://bugs.webkit.org/show_bug.cgi?id=239976
Attachments:
Description Flags
testcase 1
none
Patch
none
[fast-cq]Patch none

Daniel Holbert
Reported 2022-05-05 10:57:10 PDT
Created attachment 458892 [details] 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): > 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.
Attachments
testcase 1 (445 bytes, text/html)
2022-05-05 10:57 PDT, Daniel Holbert
no flags
Patch (12.92 KB, patch)
2026-04-25 15:33 PDT, alan
no flags
[fast-cq]Patch (17.87 KB, patch)
2026-04-25 19:06 PDT, alan
no flags
Radar WebKit Bug Importer
Comment 1 2022-05-12 10:58:12 PDT
alan
Comment 2 2026-04-25 15:33:52 PDT
alan
Comment 3 2026-04-25 19:06:09 PDT
Created attachment 479304 [details] [fast-cq]Patch
EWS
Comment 4 2026-04-27 05:11:24 PDT
Committed 312082@main (78d320c6612e): <https://commits.webkit.org/312082@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 479304 [details].
Note You need to log in before you can comment on or make changes to this bug.