| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007 Apple Inc. All rights reserved. | 
| 3  *           (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3  *           (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 
| 4  * | 4  * | 
| 5  * This library is free software; you can redistribute it and/or | 5  * This library is free software; you can redistribute it and/or | 
| 6  * modify it under the terms of the GNU Library General Public | 6  * modify it under the terms of the GNU Library General Public | 
| 7  * License as published by the Free Software Foundation; either | 7  * License as published by the Free Software Foundation; either | 
| 8  * version 2 of the License, or (at your option) any later version. | 8  * version 2 of the License, or (at your option) any later version. | 
| 9  * | 9  * | 
| 10  * This library is distributed in the hope that it will be useful, | 10  * This library is distributed in the hope that it will be useful, | 
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 216     InspectorInstrumentation::didInsertDOMNode(&node->document(), node); | 216     InspectorInstrumentation::didInsertDOMNode(&node->document(), node); | 
| 217 | 217 | 
| 218     RefPtr<Document> protectDocument(&node->document()); | 218     RefPtr<Document> protectDocument(&node->document()); | 
| 219     RefPtr<Node> protectNode(node); | 219     RefPtr<Node> protectNode(node); | 
| 220 | 220 | 
| 221     if (m_insertionPoint->inDocument()) | 221     if (m_insertionPoint->inDocument()) | 
| 222         notifyNodeInsertedIntoDocument(node); | 222         notifyNodeInsertedIntoDocument(node); | 
| 223     else if (node->isContainerNode()) | 223     else if (node->isContainerNode()) | 
| 224         notifyNodeInsertedIntoTree(toContainerNode(node)); | 224         notifyNodeInsertedIntoTree(toContainerNode(node)); | 
| 225 | 225 | 
| 226     // Script runs in didNotifySubtreeInsertions so we should lazy attach before | 226     // Script runs in didNotifySubtreeInsertions so we should schedule the rende
     r tree | 
| 227     // to ensure that triggering a style recalc in script attaches all nodes tha
     t | 227     // construction for the nodes before to ensure that triggering a style recal
     c in | 
| 228     // were inserted. | 228     // script attaches all nodes that were inserted. | 
| 229     // FIXME: We should merge the lazy attach logic into the tree traversal in | 229     // FIXME: We should merge the scheduling logic into the tree traversal in | 
| 230     // notifyNodeInsertedIntoDocument. | 230     // notifyNodeInsertedIntoDocument. | 
| 231     if (!node->attached() && node->parentNode() && node->parentNode()->attached(
     )) | 231     if (!node->attached() && node->parentNode() && node->parentNode()->attached(
     )) | 
| 232         node->lazyAttach(); | 232         node->scheduleRenderTreeCreation(); | 
| 233 | 233 | 
| 234     for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) { | 234     for (size_t i = 0; i < m_postInsertionNotificationTargets.size(); ++i) { | 
| 235         Node* node = m_postInsertionNotificationTargets[i].get(); | 235         Node* node = m_postInsertionNotificationTargets[i].get(); | 
| 236         if (node->inDocument()) | 236         if (node->inDocument()) | 
| 237             node->didNotifySubtreeInsertionsToDocument(); | 237             node->didNotifySubtreeInsertionsToDocument(); | 
| 238     } | 238     } | 
| 239 } | 239 } | 
| 240 | 240 | 
| 241 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node) | 241 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node* node) | 
| 242 { | 242 { | 
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 338         for (Node* child = m_root->firstChild(); child; child = child->nextSibli
     ng()) | 338         for (Node* child = m_root->firstChild(); child; child = child->nextSibli
     ng()) | 
| 339             collectFrameOwners(child); | 339             collectFrameOwners(child); | 
| 340     } | 340     } | 
| 341 | 341 | 
| 342     disconnectCollectedFrameOwners(); | 342     disconnectCollectedFrameOwners(); | 
| 343 } | 343 } | 
| 344 | 344 | 
| 345 } // namespace WebCore | 345 } // namespace WebCore | 
| 346 | 346 | 
| 347 #endif // ContainerNodeAlgorithms_h | 347 #endif // ContainerNodeAlgorithms_h | 
| OLD | NEW | 
|---|