Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 78d320c6612eeb3d53bb88116b447a940dc9cb23
      
https://github.com/WebKit/WebKit/commit/78d320c6612eeb3d53bb88116b447a940dc9cb23
  Author: Alan Baradlay <[email protected]>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-004-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-004-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-004.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-005-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-005.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-012-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-012-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/CSS2/floats/float-avoids-float-with-margin-012.html
    M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  -----------
  BFC with margin-start overlaps adjacent float
https://bugs.webkit.org/show_bug.cgi?id=240128

Reviewed by Antti Koivisto.

computedClearDeltaForChild checked only the border-box width against the
available space, but the border box is positioned at the margin offset. When
the margin placed the border box into the float's margin box, the overlap
went undetected and the BFC was not moved below the float.

The fix computes where the border box will actually land -
max(marginStart, positionToAvoidFloats) - and checks whether it fits from
there. The margin only consumes available space to the extent it exceeds
positionToAvoidFloats (the space already occupied by a start-side float).

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computedClearDeltaForChild):

Canonical link: https://commits.webkit.org/312082@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to