LibWeb: Implement 'State-preserving atomic move integration'

This was recently added to both the HTML and DOM specifications,
introducing the new moveBefore DOM API, as well as the new internal
'removing steps'.

See:

 * 432e8fb
 * eaf2ac7
This commit is contained in:
Shannon Booth 2025-03-08 12:45:26 +13:00 committed by Andrew Kaster
parent a47c4dbc63
commit 31a3bc3681
Notes: github-actions[bot] 2025-04-26 14:46:43 +00:00
39 changed files with 1383 additions and 12 deletions

View file

@ -48,7 +48,16 @@ void HTMLSourceElement::inserted()
// count this as a relevant mutation for child.
}
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element:html-element-removing-steps
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element:the-source-element-17
void HTMLSourceElement::moved_from(GC::Ptr<DOM::Node> old_parent)
{
Base::moved_from(old_parent);
// FIXME: 1. If oldParent is a picture element, then for each child of oldParent's children, if child is an img
// element, then count this as a relevant mutation for child.
}
// https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element:the-source-element-18
void HTMLSourceElement::removed_from(DOM::Node* old_parent, DOM::Node& old_root)
{
// The source HTML element removing steps, given removedNode and oldParent, are: