From 613764b83c3c74aa464fb5a48ff787444763554f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 15 Dec 2020 20:49:11 +0100 Subject: [PATCH] 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. --- Libraries/LibWeb/DOM/Element.cpp | 1 + 1 file changed, 1 insertion(+) 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;