Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: Source/WebCore/dom/ContainerNode.cpp

Issue 10539032: Merge 119050 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/child-insertion-notify-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/child-insertion-notify-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698