Set Ready For Review
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Updated the CL to leverage RemovedFrom and InsertedInto so the implementation is cleaner.
This fixes the case where the custom element registry gets changed duringJayson Chenuber-nit: please line wrap commit descriptions at 72 chars. This is 73. 😊
Done
if (RuntimeEnabledFeatures::ScopedCustomElementRegistryEnabled()) {
for (Node& descendant_node : NodeTraversal::InclusiveDescendantsOf(*new_child)) {Jayson ChenIt feels really weird to be putting this only here, in Node::appendChild. Shouldn't it be down in something like ContainerNode::AppendChild or ContainerNode ::InsertNodeVector or somewhere shared with the rest? I.e. shouldn't the same thing happen for insertBefore(), or replaceChildren()?
Not applicable as the impl changed.
// Note that SustainCustomElementRegistry does not sustain null registry.
// In the event of needing to sustain null registry, we need to add
// additional logic to handle that case.Jayson ChenIs this a problem?
Not applicable as the impl changed.
// registry before the move as an element's registry can only be set once.
if (RuntimeEnabledFeatures::ScopedCustomElementRegistryEnabled()) {
for (Node* target_node : nodes) {
if (auto* target_element = DynamicTo<Element>(target_node)) {
target_element->SustainCustomElementRegistry();
}
}
}Jayson Chenditto - this is a duplicate, likely because it belongs lower, right?
Not applicable as the impl changed.
Jayson ChenIdeally this test tests the various ways nodes can be moved around the tree also. E.g.
appendChild
insertBefore
append
prepend
before
after
replaceWith
moveBeforeOrdinarily I wouldn't suggest that everywhere, but I believe it might catch the bug above?
Now that we're not implementing in a way that's specific to append but mutation in general, should we still test all the mutation methods?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |