mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Allocate dataset lazily for HTML/SVG/MathML elements
Most elements never need a dataset object, so we can avoid creating lots of objects by making them lazy.
This commit is contained in:
parent
1560d6ad62
commit
4c921e17b7
Notes:
sideshowbarker
2024-07-17 06:51:10 +09:00
Author: https://github.com/awesomekling
Commit: 4c921e17b7
Pull-request: https://github.com/SerenityOS/serenity/pull/24100
6 changed files with 23 additions and 11 deletions
|
@ -23,8 +23,7 @@ public:
|
|||
virtual void inserted() override;
|
||||
virtual void removed_from(Node*) override;
|
||||
|
||||
HTML::DOMStringMap* dataset() { return m_dataset.ptr(); }
|
||||
HTML::DOMStringMap const* dataset() const { return m_dataset.ptr(); }
|
||||
[[nodiscard]] JS::NonnullGCPtr<HTML::DOMStringMap> dataset();
|
||||
|
||||
void focus();
|
||||
void blur();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue