mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-23 02:31:55 +00:00
LibWeb: Make "assign slottables for a tree" fast when there are no slots
We achieve this by keeping track of the number of HTMLSlotElements inside each ShadowRoot (do via ad-hoc insertion and removal steps.) This allows slottables assignment to skip over entire shadow roots when we know they have no slots anyway. Massive speedup on https://wpt.fyi/ which no longer takes minutes/hours to load, but instead a "mere" 19 seconds. :^)
This commit is contained in:
parent
003c045589
commit
adc25af8e2
Notes:
github-actions[bot]
2025-01-23 20:40:06 +00:00
Author: https://github.com/awesomekling
Commit: adc25af8e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3345
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 49 additions and 11 deletions
|
@ -45,6 +45,9 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
virtual void inserted() override;
|
||||
virtual void removed_from(Node* old_parent, Node& old_root) override;
|
||||
|
||||
virtual void attribute_changed(FlyString const& 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue