LibWeb: Convert Element "attribute change steps" from vector to virtual

By using a virtual function and overriding it on HTMLSlotElement, we
shrink every DOM element by 24 bytes. :^)
This commit is contained in:
Andreas Kling 2023-11-19 21:28:18 +01:00
commit bdac94870c
Notes: sideshowbarker 2024-07-17 20:19:08 +09:00
4 changed files with 68 additions and 69 deletions

View file

@ -45,6 +45,8 @@ private:
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(JS::Cell::Visitor&) override;
virtual void attribute_change_steps(FlyString const& local_name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
// https://html.spec.whatwg.org/multipage/scripting.html#manually-assigned-nodes
Vector<DOM::Slottable> m_manually_assigned_nodes;
};