1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibWeb: Don't allocate DOMStringMap in HTMLElement constructor

Allocations go in initialize().
This commit is contained in:
Andreas Kling 2022-09-03 18:49:56 +02:00
parent b30e95eb27
commit 05dcf3b2f8
2 changed files with 9 additions and 2 deletions

View file

@ -52,6 +52,8 @@ public:
protected:
HTMLElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
virtual void parse_attribute(FlyString const& name, String const& value) override;
virtual void visit_edges(Cell::Visitor&) override;
@ -69,7 +71,7 @@ private:
};
ContentEditableState content_editable_state() const;
JS::NonnullGCPtr<DOMStringMap> m_dataset;
JS::GCPtr<DOMStringMap> m_dataset;
// https://html.spec.whatwg.org/multipage/interaction.html#locked-for-focus
bool m_locked_for_focus { false };