mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibWeb: Fix InlineLevelIterator not exiting box model metric nodes
We were neglecting to pop nodes from the box model stack. The metrics were already being zeroed out when used, but let's not grow the stack needlessly.
This commit is contained in:
parent
797f51e122
commit
3ca26c7a7a
1 changed files with 6 additions and 0 deletions
|
@ -86,6 +86,12 @@ Layout::Node const* InlineLevelIterator::next_inline_node_in_pre_order(Layout::N
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// If node is the last node on the "box model node stack", pop it off.
|
||||
if (!m_box_model_node_stack.is_empty()
|
||||
&& &m_box_model_node_stack.last() == node) {
|
||||
exit_node_with_box_model_metrics();
|
||||
}
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue