mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibWeb: Give UsedValues a pointer to containing block UsedValues
This will allow us to skip hash lookups when traversing the containing block chain and looking at everyone's UsedValues.
This commit is contained in:
parent
0a09ff698f
commit
8e31bfb83c
2 changed files with 4 additions and 0 deletions
|
@ -540,6 +540,7 @@ void LayoutState::commit(Box& root)
|
|||
void LayoutState::UsedValues::set_node(NodeWithStyle& node, UsedValues const* containing_block_used_values)
|
||||
{
|
||||
m_node = &node;
|
||||
m_containing_block_used_values = containing_block_used_values;
|
||||
|
||||
// NOTE: In the code below, we decide if `node` has definite width and/or height.
|
||||
// This attempts to cover all the *general* cases where CSS considers sizes to be definite.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue