mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 15:35:08 +00:00
LibWeb: Use actual line height to calculate float y in IFC
Before, we were using the line height from NodeWithStyle::line_height() to calculate the y offset for floats inside the IFC. However, this value doesn't always correspond to the actual height of a line box. For instance, adding a fragment for an inline-block might change the height of the line box. With this change, we recalculate the height of the line box after adding a new fragment and use this recalculated height value to determine the y position for floats. Fixes https://github.com/SerenityOS/serenity/issues/20982
This commit is contained in:
parent
6ab11e5f44
commit
df2bc8187c
4 changed files with 50 additions and 3 deletions
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html><style type="text/css">
|
||||
* {
|
||||
border: 1px solid black;
|
||||
}
|
||||
.float-left {
|
||||
float: left;
|
||||
font-size: 100px;
|
||||
}
|
||||
.d-inline-block {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
background-color: sandybrown;
|
||||
}
|
||||
.Layout-sidebar {
|
||||
width: 220px;
|
||||
background-color: beige;
|
||||
}
|
||||
</style><div class="Layout-sidebar"><div class="d-inline-block">floats!!!!!!</div><div class="float-left">float left</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue