mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibWeb: Move "has-definite-width/height" flags to UsedValues
This state is less static than we originally assumed, and there are special formatting context-specific rules that say certain sizes are definite in special circumstances. To be able to support this, we move the has-definite-size flags from the layout node to the UsedValues struct instead.
This commit is contained in:
parent
25e6ad8d3e
commit
71a707480c
8 changed files with 71 additions and 70 deletions
|
@ -622,8 +622,8 @@ void Document::update_layout()
|
|||
|
||||
auto& icb = static_cast<Layout::InitialContainingBlock&>(*m_layout_root);
|
||||
auto& icb_state = layout_state.get_mutable(icb);
|
||||
icb.set_has_definite_width(true);
|
||||
icb.set_has_definite_height(true);
|
||||
icb_state.set_has_definite_width(true);
|
||||
icb_state.set_has_definite_height(true);
|
||||
icb_state.set_content_width(viewport_rect.width());
|
||||
icb_state.set_content_height(viewport_rect.height());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue