mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 07:54:58 +00:00
LibWeb: Remove shadow roots from elements that are removed from the DOM
We currently create a shadow tree once for each DOM element that renders with a shadow tree (e.g. <input>, <details>). If such an element is removed from the DOM, we must remove its shadow tree. Otherwise, the shadow tree will refer to the old document in perpetuity. If the node is added back to a DOM, then recreate the shadow tree.
This commit is contained in:
parent
3cde479416
commit
ff48b7333c
12 changed files with 67 additions and 3 deletions
|
@ -139,6 +139,7 @@ public:
|
|||
virtual void reset_algorithm() override;
|
||||
|
||||
virtual void form_associated_element_was_inserted() override;
|
||||
virtual void form_associated_element_was_removed(DOM::Node*) override;
|
||||
|
||||
// ^HTMLElement
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue