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

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

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized 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
« no previous file with comments | « no previous file | Source/core/dom/Position.h » ('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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ChildrenAffectedByForwardPositionalRules = 1 << 8, 110 ChildrenAffectedByForwardPositionalRules = 1 << 8,
111 ChildrenAffectedByBackwardPositionalRules = 1 << 9, 111 ChildrenAffectedByBackwardPositionalRules = 1 << 9,
112 112
113 NumberOfDynamicRestyleFlags = 10, 113 NumberOfDynamicRestyleFlags = 10,
114 }; 114 };
115 115
116 // This constant controls how much buffer is initially allocated 116 // This constant controls how much buffer is initially allocated
117 // for a Node Vector that is used to store child Nodes of a given Node. 117 // for a Node Vector that is used to store child Nodes of a given Node.
118 // FIXME: Optimize the value. 118 // FIXME: Optimize the value.
119 const int initialNodeVectorSize = 11; 119 const int initialNodeVectorSize = 11;
120 typedef Vector<RefPtr<Node>, initialNodeVectorSize> NodeVector; 120 typedef WillBeHeapVector<RefPtrWillBeMember<Node>, initialNodeVectorSize> NodeVe ctor;
121 121
122 class ContainerNode : public Node { 122 class ContainerNode : public Node {
123 public: 123 public:
124 virtual ~ContainerNode(); 124 virtual ~ContainerNode();
125 125
126 Node* firstChild() const { return m_firstChild; } 126 Node* firstChild() const { return m_firstChild; }
127 Node* lastChild() const { return m_lastChild; } 127 Node* lastChild() const { return m_lastChild; }
128 bool hasChildren() const { return m_firstChild; } 128 bool hasChildren() const { return m_firstChild; }
129 129
130 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling (); } 130 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling (); }
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 inline void getChildNodes(Node& node, NodeVector& nodes) 365 inline void getChildNodes(Node& node, NodeVector& nodes)
366 { 366 {
367 ASSERT(!nodes.size()); 367 ASSERT(!nodes.size());
368 for (Node* child = node.firstChild(); child; child = child->nextSibling()) 368 for (Node* child = node.firstChild(); child; child = child->nextSibling())
369 nodes.append(child); 369 nodes.append(child);
370 } 370 }
371 371
372 } // namespace WebCore 372 } // namespace WebCore
373 373
374 #endif // ContainerNode_h 374 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698