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

Side by Side Diff: sky/engine/core/dom/ContainerNode.h

Issue 732203004: Clean up child checks in ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add back secondary hierarchy checks. Created 6 years, 1 month 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 | « no previous file | sky/engine/core/dom/ContainerNode.cpp » ('j') | 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, 2009, 2010, 2011, 2013 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All r ights 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void updateTreeAfterInsertion(Node& child); 135 void updateTreeAfterInsertion(Node& child);
136 void willRemoveChildren(); 136 void willRemoveChildren();
137 void willRemoveChild(Node& child); 137 void willRemoveChild(Node& child);
138 void removeDetachedChildrenInContainer(ContainerNode&); 138 void removeDetachedChildrenInContainer(ContainerNode&);
139 void addChildNodesToDeletionQueue(Node*&, Node*&, ContainerNode&); 139 void addChildNodesToDeletionQueue(Node*&, Node*&, ContainerNode&);
140 140
141 void notifyNodeInserted(Node&, ChildrenChangeSource = ChildrenChangeSourceAP I); 141 void notifyNodeInserted(Node&, ChildrenChangeSource = ChildrenChangeSourceAP I);
142 void notifyNodeInsertedInternal(Node&, NodeVector& postInsertionNotification Targets); 142 void notifyNodeInsertedInternal(Node&, NodeVector& postInsertionNotification Targets);
143 void notifyNodeRemoved(Node&); 143 void notifyNodeRemoved(Node&);
144 144
145 inline bool checkAcceptChildGuaranteedNodeTypes(const Node& newChild, Except ionState&) const; 145 inline void checkAcceptChildType(const Node* newChild, ExceptionState&) cons t;
146 inline bool checkAcceptChild(const Node* newChild, const Node* oldChild, Exc eptionState&) const; 146 inline void checkAcceptChildHierarchy(const Node& newChild, const Node* oldC hild, ExceptionState&) const;
147 inline bool containsConsideringHostElements(const Node&) const; 147 inline bool containsConsideringHostElements(const Node&) const;
148 inline bool isChildTypeAllowed(const Node& child) const;
149 148
150 void attachChildren(const AttachContext& = AttachContext()); 149 void attachChildren(const AttachContext& = AttachContext());
151 void detachChildren(const AttachContext& = AttachContext()); 150 void detachChildren(const AttachContext& = AttachContext());
152 151
153 bool getUpperLeftCorner(FloatPoint&) const; 152 bool getUpperLeftCorner(FloatPoint&) const;
154 bool getLowerRightCorner(FloatPoint&) const; 153 bool getLowerRightCorner(FloatPoint&) const;
155 154
156 RawPtr<Node> m_firstChild; 155 RawPtr<Node> m_firstChild;
157 RawPtr<Node> m_lastChild; 156 RawPtr<Node> m_lastChild;
158 }; 157 };
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) 219 inline void getChildNodes(ContainerNode& node, NodeVector& nodes)
221 { 220 {
222 ASSERT(!nodes.size()); 221 ASSERT(!nodes.size());
223 for (Node* child = node.firstChild(); child; child = child->nextSibling()) 222 for (Node* child = node.firstChild(); child; child = child->nextSibling())
224 nodes.append(child); 223 nodes.append(child);
225 } 224 }
226 225
227 } // namespace blink 226 } // namespace blink
228 227
229 #endif // ContainerNode_h 228 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698