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

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

Issue 17038004: Remove needsShadowTreeWalker flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 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/Element.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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 inline Node* Node::highestAncestor() const 257 inline Node* Node::highestAncestor() const
258 { 258 {
259 Node* node = const_cast<Node*>(this); 259 Node* node = const_cast<Node*>(this);
260 Node* highest = node; 260 Node* highest = node;
261 for (; node; node = node->parentNode()) 261 for (; node; node = node->parentNode())
262 highest = node; 262 highest = node;
263 return highest; 263 return highest;
264 } 264 }
265 265
266 inline bool Node::needsShadowTreeWalker() const
267 {
268 if (getFlag(NeedsShadowTreeWalkerFlag))
269 return true;
270 ContainerNode* parent = parentOrShadowHostNode();
271 return parent && parent->getFlag(NeedsShadowTreeWalkerFlag);
272 }
273
274 // This constant controls how much buffer is initially allocated 266 // This constant controls how much buffer is initially allocated
275 // for a Node Vector that is used to store child Nodes of a given Node. 267 // for a Node Vector that is used to store child Nodes of a given Node.
276 // FIXME: Optimize the value. 268 // FIXME: Optimize the value.
277 const int initialNodeVectorSize = 11; 269 const int initialNodeVectorSize = 11;
278 typedef Vector<RefPtr<Node>, initialNodeVectorSize> NodeVector; 270 typedef Vector<RefPtr<Node>, initialNodeVectorSize> NodeVector;
279 271
280 inline void getChildNodes(Node* node, NodeVector& nodes) 272 inline void getChildNodes(Node* node, NodeVector& nodes)
281 { 273 {
282 ASSERT(!nodes.size()); 274 ASSERT(!nodes.size());
283 for (Node* child = node->firstChild(); child; child = child->nextSibling()) 275 for (Node* child = node->firstChild(); child; child = child->nextSibling())
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 m_node->resumePostAttachCallbacks(); 355 m_node->resumePostAttachCallbacks();
364 } 356 }
365 357
366 private: 358 private:
367 ContainerNode* m_node; 359 ContainerNode* m_node;
368 }; 360 };
369 361
370 } // namespace WebCore 362 } // namespace WebCore
371 363
372 #endif // ContainerNode_h 364 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698