1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

LibWeb: Rename LayoutState::NodeState => LayoutState::UsedValues

This object contains all the CSS "used values" as seen during the layout
process, so calling it "used values" seems appropriate. :^)
This commit is contained in:
Andreas Kling 2022-07-16 23:43:48 +02:00
parent 52862c72d0
commit 9b46091f38
10 changed files with 76 additions and 76 deletions

View file

@ -614,12 +614,12 @@ void Document::update_layout()
m_layout_root = static_ptr_cast<Layout::InitialContainingBlock>(tree_builder.build(*this));
}
Layout::LayoutState formatting_state;
formatting_state.nodes.resize(layout_node_count());
Layout::BlockFormattingContext root_formatting_context(formatting_state, *m_layout_root, nullptr);
Layout::LayoutState layout_state;
layout_state.used_values_per_layout_node.resize(layout_node_count());
Layout::BlockFormattingContext root_formatting_context(layout_state, *m_layout_root, nullptr);
auto& icb = static_cast<Layout::InitialContainingBlock&>(*m_layout_root);
auto& icb_state = formatting_state.get_mutable(icb);
auto& icb_state = layout_state.get_mutable(icb);
icb_state.content_width = viewport_rect.width();
icb_state.content_height = viewport_rect.height();
@ -627,7 +627,7 @@ void Document::update_layout()
icb.set_has_definite_height(true);
root_formatting_context.run(*m_layout_root, Layout::LayoutMode::Normal);
formatting_state.commit();
layout_state.commit();
browsing_context()->set_needs_display();