mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +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:
committed by
Andreas Kling
parent
003c045589
commit
adc25af8e2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user