mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-23 10:41:52 +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:
parent
67c950b002
commit
b8537f760d
Notes:
github-actions[bot]
2025-02-04 21:29:19 +00:00
Author: https://github.com/awesomekling
Commit: b8537f760d
4 changed files with 11 additions and 49 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue