mirror of
https://github.com/servo/servo
synced 2026-05-10 17:12:23 +02:00
In order to know whether a block box can collapse its bottom margin with the bottom margin of its last child, we need to check its tentative block size. Most usually, this will be the block size of the containing block that is used when laying out the children. However, anonymous blocks do not establish a containing block. So using the containing block for children meant that we were using the tentative block size of its parent. If that parent had a definite size, this would prevent the anonymous block from collapsing bottom margins with its children. This situation could happen when placing a block-level inside of an inline box. This patch fixes the problem by using an indefinite tentative block size for anonymous blocks, instead of the containing block for children. Testing: Adding new test Fixes: #42469 Signed-off-by: Oriol Brufau <obrufau@igalia.com>