mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibWeb: Make the node mutation event functions spec compliant
This particularly affects the insertion steps and the removed steps. The insertion steps no longer take into the parent that the node was inserted to, as per the spec. Due to this, I have renamed the function from "inserted_into" to simply "inserted". None of the users of the insertion steps was using it anyway. The removed steps now take a pointer to the old parent instead of a reference. This is because it is optional according to the spec and old parent is null when running the removal steps for the descendants of a node that just got removed. This commit does not affect HTMLScriptElement as there is a bit more to that, which is better suited for a separate commit. Also adds in the adopted steps as they will be used later.
This commit is contained in:
parent
9e338a2be2
commit
e3d01c5e10
Notes:
sideshowbarker
2024-07-18 20:43:09 +09:00
Author: https://github.com/Lubrsi
Commit: e3d01c5e10
Pull-request: https://github.com/SerenityOS/serenity/pull/6158
9 changed files with 14 additions and 13 deletions
|
@ -54,9 +54,9 @@ void HTMLIFrameElement::parse_attribute(const FlyString& name, const String& val
|
|||
load_src(value);
|
||||
}
|
||||
|
||||
void HTMLIFrameElement::inserted_into(Node& parent)
|
||||
void HTMLIFrameElement::inserted()
|
||||
{
|
||||
FrameHostElement::inserted_into(parent);
|
||||
FrameHostElement::inserted();
|
||||
if (is_connected())
|
||||
load_src(attribute(HTML::AttributeNames::src));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue