LibWeb: Mark elements for style update after their children change

This commit is contained in:
Andreas Kling 2021-10-12 17:53:52 +02:00
commit edbd8b22e8
Notes: sideshowbarker 2024-07-18 02:48:16 +09:00
2 changed files with 7 additions and 0 deletions

View file

@ -389,4 +389,10 @@ int Element::client_height() const
return box.absolute_rect().height(); return box.absolute_rect().height();
} }
void Element::children_changed()
{
Node::children_changed();
set_needs_style_update(true);
}
} }

View file

@ -122,6 +122,7 @@ public:
protected: protected:
RefPtr<Layout::Node> create_layout_node() override; RefPtr<Layout::Node> create_layout_node() override;
virtual void children_changed() override;
private: private:
Attribute* find_attribute(const FlyString& name); Attribute* find_attribute(const FlyString& name);