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, 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void checkForChildrenAdjacentRuleChanges(); | 149 void checkForChildrenAdjacentRuleChanges(); |
150 void checkForSiblingStyleChanges(bool finishedParsingCallback, Node* beforeC
hange, Node* afterChange, int childCountDelta); | 150 void checkForSiblingStyleChanges(bool finishedParsingCallback, Node* beforeC
hange, Node* afterChange, int childCountDelta); |
151 | 151 |
152 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } | 152 bool childrenSupportStyleSharing() const { return !hasRestyleFlags(); } |
153 | 153 |
154 // -------------------------------------------------------------------------
---- | 154 // -------------------------------------------------------------------------
---- |
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 // FIXME: Replace the bool for createdByParser with the InsertionSourceType. | |
160 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); |
161 | 160 |
162 void disconnectDescendantFrames(); | 161 void disconnectDescendantFrames(); |
163 | 162 |
164 virtual void trace(Visitor*) OVERRIDE; | 163 virtual void trace(Visitor*) OVERRIDE; |
165 | 164 |
166 enum InsertionSourceType { InsertedByDOM, InsertedByParser }; | 165 void notifyNodeInserted(Node&); |
167 void notifyNodeInserted(Node&, InsertionSourceType = InsertedByDOM); | |
168 void notifyNodeRemoved(Node&); | 166 void notifyNodeRemoved(Node&); |
169 | 167 |
170 protected: | 168 protected: |
171 ContainerNode(TreeScope*, ConstructionType = CreateContainer); | 169 ContainerNode(TreeScope*, ConstructionType = CreateContainer); |
172 | 170 |
173 template<class GenericNode, class GenericNodeContainer> | 171 template<class GenericNode, class GenericNodeContainer> |
174 friend void appendChildToContainer(GenericNode& child, GenericNodeContainer&
); | 172 friend void appendChildToContainer(GenericNode& child, GenericNodeContainer&
); |
175 | 173 |
176 template<class GenericNode, class GenericNodeContainer> | 174 template<class GenericNode, class GenericNodeContainer> |
177 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 Loading... |
309 inline void getChildNodes(Node& node, NodeVector& nodes) | 307 inline void getChildNodes(Node& node, NodeVector& nodes) |
310 { | 308 { |
311 ASSERT(!nodes.size()); | 309 ASSERT(!nodes.size()); |
312 for (Node* child = node.firstChild(); child; child = child->nextSibling()) | 310 for (Node* child = node.firstChild(); child; child = child->nextSibling()) |
313 nodes.append(child); | 311 nodes.append(child); |
314 } | 312 } |
315 | 313 |
316 } // namespace WebCore | 314 } // namespace WebCore |
317 | 315 |
318 #endif // ContainerNode_h | 316 #endif // ContainerNode_h |
OLD | NEW |