mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
Revert "LibWeb: Make "assign slottables for a tree" fast when there are no slots"
This reverts commit adc25af8e2.
This caused images to stop loading on https://reddit.com/ and needs
more investigation.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <LibWeb/Bindings/HTMLSlotElementPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/HTML/HTMLSlotElement.h>
|
||||
|
||||
@@ -148,21 +147,4 @@ void HTMLSlotElement::attribute_changed(FlyString const& local_name, Optional<St
|
||||
}
|
||||
}
|
||||
|
||||
void HTMLSlotElement::inserted()
|
||||
{
|
||||
Base::inserted();
|
||||
auto& root = this->root();
|
||||
if (!root.is_shadow_root())
|
||||
return;
|
||||
static_cast<DOM::ShadowRoot&>(root).increment_slot_count();
|
||||
}
|
||||
|
||||
void HTMLSlotElement::removed_from(Node* old_parent, Node& old_root)
|
||||
{
|
||||
Base::removed_from(old_parent, old_root);
|
||||
if (!old_root.is_shadow_root())
|
||||
return;
|
||||
static_cast<DOM::ShadowRoot&>(old_root).decrement_slot_count();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user