[Webkit-unassigned] [Bug 239976] New: WebKit pushes down a BFC alongside float, if the BFC has any negative margin at all

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 2 12:03:37 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=239976

            Bug ID: 239976
           Summary: WebKit pushes down a BFC alongside float, if the BFC
                    has any negative margin at all
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dholbert at mozilla.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 458698

  --> https://bugs.webkit.org/attachment.cgi?id=458698&action=review

testcase 1

STR:
1. Load attached testcase.

EXPECTED RESULTS:
The three sections should all have the same layout.

ACTUAL RESULTS:
In the lower two sections (the ones with a small negative margin), the aqua BFC gets pushed (i.e. cleared/wrapped) down below the fuchsia float.

Firefox and Chrome (Gecko/Blink) give EXPECTED RESULTS.
Safari (WebKit) gives ACTUAL RESULTS.


Note that there's a lot of subtlety and spec ambiguity in this area.  I do think it makes sense for sufficiently-large negative margins to cause content to wrap -- specifically if those margins are negative enough to "prop up" the border-box to be larger than the available space.  See https://bugzilla.mozilla.org/show_bug.cgi?id=1745310#c9 for more thoughts on this.  (I'm implementing this behavior in Gecko over there.)

In this particular attached testcase, though, with -5px margins (or even -1px margins), WebKit wraps even though there's no reason to do so that I can see.  And WebKit is alone in this behavior, so I'm tentatively filing this as a WebKit bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220502/6882049d/attachment.htm>


More information about the webkit-unassigned mailing list