Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Jun 3, 2023

Needs (and based on) PR GH-11362 . I will rebase this once that PR is merged.
Fixes #81642

After the fixes I did recently, the above bug no longer hangs, but still produces the wrong result for the first case. This is because the algorithm that is used for replaceWith isn't entirely correct: if the node becomes a part of the fragment, then removing the node actually removes the fragment. This results in the sudden removal of the node instead of replacing it.
I had to move some code around to be able to detect this.

ndossche added 2 commits June 3, 2023 16:55
…le namespaces

The test was amended from the original issue report. For the test:
Co-authored-by: [email protected]

The problem is that the regular dom_reconcile_ns() only works on a
single node. We actually have to reconciliate the whole tree in case a
fragment was added. This also required to move some code around such
that this special case could be handled separately.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me


dom_parent_node_after(intern, args, argc);
dom_child_node_remove(intern);
dom_child_replace_with(intern, args, argc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but the argc variable should be of type uint32_t

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, something for a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants