Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear floats added dynamically to previous siblings
Clear floats added dynamically to previous siblings https://bugs.webkit.org/show_bug.cgi?id=247237 Reviewed by Alan Baradlay. This patch is to align Webkit behavior with Blink / Chrome and Gecko / Firefox. Merge - https://chromium.googlesource.com/chromium/src.git/+/c75a8e71e60527400e95d0834f4a07a018087130 If margin collapsing moves a child up into a previous sibling, we shouldn't add any floats that it may have cleared and prompt another layout so that the child can also clear them if necessary. Confining the need for a layout to cases where the self-collapsing block has margin excludes the more obvious case where a sibling has a lot of negative margin and moves up into a sibling with nested floats inside. * Source/WebCore/rendering/RenderBlockFlow: (RenderBlockFlow::collapseMarginsWithChildInfo): Remove "clearanceForSelfCollapsingBlock" and conditions and update comment as needed * LayoutTests/fast/block/margin-collapse/clear-dynamically-added-float.html: Added Test Case * LayoutTests/fast/block/margin-collapse/clear-dynamically-added-float-expected.txt: Added Test Case Expectations Canonical link: https://commits.webkit.org/256238@main
- Loading branch information
Showing 3 changed files with 39 additions and 9 deletions.