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

Side by Side Diff: Source/core/dom/ContainerNode.h

Issue 306233005: Call insertedInto or removedFrom before childrenChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass right flags, don't notify on ShadowRoot Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/ContainerNode.cpp » ('J')
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, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Notification of document structure changes (see core/dom/Node.h for more notification methods) 155 // Notification of document structure changes (see core/dom/Node.h for more notification methods)
156 156
157 // Notifies the node that it's list of children have changed (either by addi ng or removing child nodes), or a child 157 // Notifies the node that it's list of children have changed (either by addi ng or removing child nodes), or a child
158 // node that is of the type CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE ha s changed its value. 158 // node that is of the type CDATA_SECTION_NODE, TEXT_NODE or COMMENT_NODE ha s changed its value.
159 virtual void childrenChanged(bool createdByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0); 159 virtual void childrenChanged(bool createdByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0);
160 160
161 void disconnectDescendantFrames(); 161 void disconnectDescendantFrames();
162 162
163 virtual void trace(Visitor*) OVERRIDE; 163 virtual void trace(Visitor*) OVERRIDE;
164 164
165 void notifyNodeInserted(Node&); 165 void notifyNodeInserted(Node&, bool createdByParser = false);
166 void notifyNodeRemoved(Node&); 166 void notifyNodeRemoved(Node&);
167 167
168 protected: 168 protected:
169 ContainerNode(TreeScope*, ConstructionType = CreateContainer); 169 ContainerNode(TreeScope*, ConstructionType = CreateContainer);
170 170
171 template<class GenericNode, class GenericNodeContainer> 171 template<class GenericNode, class GenericNodeContainer>
172 friend void appendChildToContainer(GenericNode& child, GenericNodeContainer& ); 172 friend void appendChildToContainer(GenericNode& child, GenericNodeContainer& );
173 173
174 template<class GenericNode, class GenericNodeContainer> 174 template<class GenericNode, class GenericNodeContainer>
175 friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, Generi cNode*& tail, GenericNodeContainer&); 175 friend void Private::addChildNodesToDeletionQueue(GenericNode*& head, Generi cNode*& tail, GenericNodeContainer&);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 inline void getChildNodes(Node& node, NodeVector& nodes) 307 inline void getChildNodes(Node& node, NodeVector& nodes)
308 { 308 {
309 ASSERT(!nodes.size()); 309 ASSERT(!nodes.size());
310 for (Node* child = node.firstChild(); child; child = child->nextSibling()) 310 for (Node* child = node.firstChild(); child; child = child->nextSibling())
311 nodes.append(child); 311 nodes.append(child);
312 } 312 }
313 313
314 } // namespace WebCore 314 } // namespace WebCore
315 315
316 #endif // ContainerNode_h 316 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/ContainerNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698