mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibWeb: Make box content sizes indefinite before intrinsic sizing
When calculating the intrinsic width of a box, we now make its content width & height indefinite before entering the intrinsic sizing layout. This ensures that any geometry assigned to the box by its parent formatting context is ignored. For intrinsic heights, we only make the content height indefinite. This is because used content width is a valid (but optional) input to intrinsic height calculation.
This commit is contained in:
parent
7639eccd53
commit
ca290b27ea
3 changed files with 23 additions and 0 deletions
|
@ -416,4 +416,14 @@ void LayoutState::UsedValues::set_content_y(CSSPixels y)
|
|||
offset.set_y(y);
|
||||
}
|
||||
|
||||
void LayoutState::UsedValues::set_indefinite_content_width()
|
||||
{
|
||||
m_has_definite_width = false;
|
||||
}
|
||||
|
||||
void LayoutState::UsedValues::set_indefinite_content_height()
|
||||
{
|
||||
m_has_definite_height = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue