LibWeb: Actually apply recomputed style to element's layout node

Otherwise fetching stuff via LayoutNode::style() will have stale values
since we were only updating the specified_style() here.

LayoutNode::specified_style() should eventually go away since there's
no need to carry those uncooked values around with the layout tree.
This commit is contained in:
Andreas Kling 2020-12-15 20:49:11 +01:00
parent ef61430738
commit 613764b83c
Notes: sideshowbarker 2024-07-19 00:48:30 +09:00

View file

@ -220,6 +220,7 @@ void Element::recompute_style()
if (diff == StyleDifference::None)
return;
layout_node()->set_specified_style(*style);
layout_node()->apply_style(*style);
if (diff == StyleDifference::NeedsRelayout) {
document().force_layout();
return;