| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 DCHECK(!targetNode->parentNode()); | 222 DCHECK(!targetNode->parentNode()); |
| 223 Node& child = *targetNode; | 223 Node& child = *targetNode; |
| 224 mutator(*this, child, next); | 224 mutator(*this, child, next); |
| 225 ChildListMutationScope(*this).childAdded(child); | 225 ChildListMutationScope(*this).childAdded(child); |
| 226 if (document().containsV1ShadowTree()) | 226 if (document().containsV1ShadowTree()) |
| 227 child.checkSlotChangeAfterInserted(); | 227 child.checkSlotChangeAfterInserted(); |
| 228 probe::didInsertDOMNode(&child); | 228 probe::didInsertDOMNode(&child); |
| 229 notifyNodeInsertedInternal(child, postInsertionNotificationTargets); | 229 notifyNodeInsertedInternal(child, postInsertionNotificationTargets); |
| 230 } | 230 } |
| 231 } | 231 } |
| 232 for (const auto& targetNode : targets) | 232 Node* unchangedPrevious = |
| 233 childrenChanged( | 233 targets.size() > 0 ? targets[0]->previousSibling() : nullptr; |
| 234 ChildrenChange::forInsertion(*targetNode, ChildrenChangeSourceAPI)); | 234 for (const auto& targetNode : targets) { |
| 235 childrenChanged(ChildrenChange::forInsertion( |
| 236 *targetNode, unchangedPrevious, next, ChildrenChangeSourceAPI)); |
| 237 } |
| 235 for (const auto& descendant : postInsertionNotificationTargets) { | 238 for (const auto& descendant : postInsertionNotificationTargets) { |
| 236 if (descendant->isConnected()) | 239 if (descendant->isConnected()) |
| 237 descendant->didNotifySubtreeInsertionsToDocument(); | 240 descendant->didNotifySubtreeInsertionsToDocument(); |
| 238 } | 241 } |
| 239 for (const auto& targetNode : targets) { | 242 for (const auto& targetNode : targets) { |
| 240 if (targetNode->parentNode() == this) | 243 if (targetNode->parentNode() == this) |
| 241 dispatchChildInsertionEvents(*targetNode); | 244 dispatchChildInsertionEvents(*targetNode); |
| 242 } | 245 } |
| 243 dispatchSubtreeModifiedEvent(); | 246 dispatchSubtreeModifiedEvent(); |
| 244 } | 247 } |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 DCHECK(!root.isShadowRoot()); | 710 DCHECK(!root.isShadowRoot()); |
| 708 | 711 |
| 709 if (document().containsV1ShadowTree()) | 712 if (document().containsV1ShadowTree()) |
| 710 root.checkSlotChangeAfterInserted(); | 713 root.checkSlotChangeAfterInserted(); |
| 711 | 714 |
| 712 probe::didInsertDOMNode(&root); | 715 probe::didInsertDOMNode(&root); |
| 713 | 716 |
| 714 NodeVector postInsertionNotificationTargets; | 717 NodeVector postInsertionNotificationTargets; |
| 715 notifyNodeInsertedInternal(root, postInsertionNotificationTargets); | 718 notifyNodeInsertedInternal(root, postInsertionNotificationTargets); |
| 716 | 719 |
| 717 childrenChanged(ChildrenChange::forInsertion(root, source)); | 720 childrenChanged(ChildrenChange::forInsertion(root, root.previousSibling(), |
| 721 root.nextSibling(), source)); |
| 718 | 722 |
| 719 for (const auto& targetNode : postInsertionNotificationTargets) { | 723 for (const auto& targetNode : postInsertionNotificationTargets) { |
| 720 if (targetNode->isConnected()) | 724 if (targetNode->isConnected()) |
| 721 targetNode->didNotifySubtreeInsertionsToDocument(); | 725 targetNode->didNotifySubtreeInsertionsToDocument(); |
| 722 } | 726 } |
| 723 } | 727 } |
| 724 | 728 |
| 725 DISABLE_CFI_PERF | 729 DISABLE_CFI_PERF |
| 726 void ContainerNode::notifyNodeInsertedInternal( | 730 void ContainerNode::notifyNodeInsertedInternal( |
| 727 Node& root, | 731 Node& root, |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 return true; | 1481 return true; |
| 1478 | 1482 |
| 1479 if (node->isElementNode() && toElement(node)->shadow()) | 1483 if (node->isElementNode() && toElement(node)->shadow()) |
| 1480 return true; | 1484 return true; |
| 1481 | 1485 |
| 1482 return false; | 1486 return false; |
| 1483 } | 1487 } |
| 1484 #endif | 1488 #endif |
| 1485 | 1489 |
| 1486 } // namespace blink | 1490 } // namespace blink |
| OLD | NEW |