mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
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:
parent
ef61430738
commit
613764b83c
Notes:
sideshowbarker
2024-07-19 00:48:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/613764b83c3
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue