| Index: third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| index cfe0428c4d1150b125568ba6936061c3c3ebea3b..00422e14e2eb82e111f910c46119c1aebca2570a 100644
|
| --- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
| @@ -229,9 +229,12 @@ void ContainerNode::insertNodeVector(const NodeVector& targets,
|
| notifyNodeInsertedInternal(child, postInsertionNotificationTargets);
|
| }
|
| }
|
| - for (const auto& targetNode : targets)
|
| - childrenChanged(
|
| - ChildrenChange::forInsertion(*targetNode, ChildrenChangeSourceAPI));
|
| + Node* unchangedPrevious =
|
| + targets.size() > 0 ? targets[0]->previousSibling() : nullptr;
|
| + for (const auto& targetNode : targets) {
|
| + childrenChanged(ChildrenChange::forInsertion(
|
| + *targetNode, unchangedPrevious, next, ChildrenChangeSourceAPI));
|
| + }
|
| for (const auto& descendant : postInsertionNotificationTargets) {
|
| if (descendant->isConnected())
|
| descendant->didNotifySubtreeInsertionsToDocument();
|
| @@ -714,7 +717,8 @@ void ContainerNode::notifyNodeInserted(Node& root,
|
| NodeVector postInsertionNotificationTargets;
|
| notifyNodeInsertedInternal(root, postInsertionNotificationTargets);
|
|
|
| - childrenChanged(ChildrenChange::forInsertion(root, source));
|
| + childrenChanged(ChildrenChange::forInsertion(root, root.previousSibling(),
|
| + root.nextSibling(), source));
|
|
|
| for (const auto& targetNode : postInsertionNotificationTargets) {
|
| if (targetNode->isConnected())
|
|
|