summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/Element.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-15 20:49:11 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-15 20:49:11 +0100
commit613764b83c3c74aa464fb5a48ff787444763554f (patch)
tree83295861538f5dd1e10db564eddc215c9ef54baf /Libraries/LibWeb/DOM/Element.cpp
parentef614307388891a58189d5639cb06be802f56d79 (diff)
downloadserenity-613764b83c3c74aa464fb5a48ff787444763554f.zip
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.
Diffstat (limited to 'Libraries/LibWeb/DOM/Element.cpp')
-rw-r--r--Libraries/LibWeb/DOM/Element.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp
index 1956cc21a4..eb5d9fea8c 100644
--- a/Libraries/LibWeb/DOM/Element.cpp
+++ b/Libraries/LibWeb/DOM/Element.cpp
@@ -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;