mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Don't throw away UA shadow trees willy-nilly
We were unnecessarily discarding the shadow trees of various elements when they were removed or detached from the DOM. This especially caused a *lot* of churn when creating input elements via setting .innerHTML on something. We ended up building each input element's shadow tree 3 times instead of 1. The original issue that we were trying to solve by discarding shadow trees appears to have been solved elsewhere, and nothing else seems to break by just allowing them to remain in place. 1.05x speedup on Speedometer's TodoMVC-jQuery.
This commit is contained in:
Notes:
github-actions[bot]
2025-05-09 16:50:05 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/f61df9d34cb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4673 Reviewed-by: https://github.com/trflynn89 ✅
@@ -70,7 +70,6 @@ public:
|
||||
virtual WebIDL::ExceptionOr<void> cloned(Node&, bool) const override;
|
||||
|
||||
virtual void form_associated_element_was_inserted() override;
|
||||
virtual void form_associated_element_was_removed(DOM::Node*) override;
|
||||
virtual void form_associated_element_attribute_changed(FlyString const&, Optional<String> const&, Optional<FlyString> const&) override;
|
||||
|
||||
virtual void children_changed(ChildrenChangedMetadata const*) override;
|
||||
|
||||
Reference in New Issue
Block a user