1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibWeb: Take floats into account when measuring automatic width of IFC

When there are floats present inside an IFC, we must coordinate with
the parent BFC to calculate the automatic width of the IFC's block box.
This is because the IFC is not directly aware of floats. Only the BFC
knows enough about them to account for them in automatic sizing.
This commit is contained in:
Andreas Kling 2023-05-03 17:14:15 +02:00
parent 610a7603a2
commit 508927cae2
4 changed files with 30 additions and 3 deletions

View file

@ -0,0 +1,15 @@
<!doctype html><style>
* {
}
body {
position: absolute;
}
.black {
background: magenta;
border: 50px solid black;
}
.green {
float: left;
border: 20px solid lime;
}
</style><body><div class="black"><div class="green"></div>