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 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 ASSERT(!newChild->parentNode()); // Use appendChild if you need to handle re
parenting (and want DOM mutation events). | 586 ASSERT(!newChild->parentNode()); // Use appendChild if you need to handle re
parenting (and want DOM mutation events). |
587 | 587 |
588 forbidEventDispatch(); | 588 forbidEventDispatch(); |
589 Node* last = m_lastChild; | 589 Node* last = m_lastChild; |
590 // FIXME: This method should take a PassRefPtr. | 590 // FIXME: This method should take a PassRefPtr. |
591 appendChildToContainer(newChild.get(), this); | 591 appendChildToContainer(newChild.get(), this); |
592 treeScope()->adoptIfNeeded(newChild.get()); | 592 treeScope()->adoptIfNeeded(newChild.get()); |
593 | 593 |
594 allowEventDispatch(); | 594 allowEventDispatch(); |
595 | 595 |
596 // FIXME: Why doesn't this use notify(newChild.get()) instead? | |
597 if (inDocument()) | |
598 ChildNodeInsertionNotifier(this).notifyInsertedIntoDocument(newChild.get
()); | |
599 childrenChanged(true, last, 0, 1); | 596 childrenChanged(true, last, 0, 1); |
| 597 ChildNodeInsertionNotifier(this).notify(newChild.get()); |
600 } | 598 } |
601 | 599 |
602 void ContainerNode::suspendPostAttachCallbacks() | 600 void ContainerNode::suspendPostAttachCallbacks() |
603 { | 601 { |
604 if (!s_attachDepth) { | 602 if (!s_attachDepth) { |
605 ASSERT(!s_shouldReEnableMemoryCacheCallsAfterAttach); | 603 ASSERT(!s_shouldReEnableMemoryCacheCallsAfterAttach); |
606 if (Page* page = document()->page()) { | 604 if (Page* page = document()->page()) { |
607 // FIXME: How can this call be specific to one Page, while the | 605 // FIXME: How can this call be specific to one Page, while the |
608 // s_attachDepth is a global? Doesn't make sense. | 606 // s_attachDepth is a global? Doesn't make sense. |
609 if (page->areMemoryCacheClientCallsEnabled()) { | 607 if (page->areMemoryCacheClientCallsEnabled()) { |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 if (shouldLazyAttach) | 992 if (shouldLazyAttach) |
995 child->lazyAttach(); | 993 child->lazyAttach(); |
996 else | 994 else |
997 child->attach(); | 995 child->attach(); |
998 } | 996 } |
999 | 997 |
1000 dispatchChildInsertionEvents(child); | 998 dispatchChildInsertionEvents(child); |
1001 } | 999 } |
1002 | 1000 |
1003 } // namespace WebCore | 1001 } // namespace WebCore |
OLD | NEW |