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

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

Issue 9374044: Merge 106715 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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/remove-body-during-title-creation-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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if (removedChild->inDocument()) 598 if (removedChild->inDocument())
599 removedChild->removedFromDocument(); 599 removedChild->removedFromDocument();
600 // removeChild() calls removedFromTree(true) if the child was not in the 600 // removeChild() calls removedFromTree(true) if the child was not in the
601 // document. There is no explanation for this discrepancy between remove Child() 601 // document. There is no explanation for this discrepancy between remove Child()
602 // and its optimized version removeChildren(). 602 // and its optimized version removeChildren().
603 } 603 }
604 } 604 }
605 605
606 bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec, bo ol shouldLazyAttach) 606 bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec, bo ol shouldLazyAttach)
607 { 607 {
608 RefPtr<ContainerNode> protector(this);
609
608 // Check that this node is not "floating". 610 // Check that this node is not "floating".
609 // If it is, it can be deleted as a side effect of sending mutation events. 611 // If it is, it can be deleted as a side effect of sending mutation events.
610 ASSERT(refCount() || parentOrHostNode()); 612 ASSERT(refCount() || parentOrHostNode());
611 613
612 ec = 0; 614 ec = 0;
613 615
614 // Make sure adding the new child is ok 616 // Make sure adding the new child is ok
615 checkAddChild(newChild.get(), ec); 617 checkAddChild(newChild.get(), ec);
616 if (ec) 618 if (ec)
617 return false; 619 return false;
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER)) 1167 if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER))
1166 return true; 1168 return true;
1167 1169
1168 RefPtr<ContainerNode> protector(this); 1170 RefPtr<ContainerNode> protector(this);
1169 RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL) ; 1171 RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL) ;
1170 dispatchEvent(beforeLoadEvent.get()); 1172 dispatchEvent(beforeLoadEvent.get());
1171 return !beforeLoadEvent->defaultPrevented(); 1173 return !beforeLoadEvent->defaultPrevented();
1172 } 1174 }
1173 1175
1174 } // namespace WebCore 1176 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/remove-body-during-title-creation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698