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

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

Issue 22887044: [oilpan] Make the oilpan branch build on Mac. (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Add FIXME. Created 7 years, 4 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 | « Source/core/css/StyleRuleImport.cpp ('k') | Source/core/dom/Document.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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return adoptRawResult(static_cast<const ContainerNode*>(node)); 175 return adoptRawResult(static_cast<const ContainerNode*>(node));
176 } 176 }
177 177
178 inline Result<ContainerNode> toContainerNode(const Handle<Node>& node) 178 inline Result<ContainerNode> toContainerNode(const Handle<Node>& node)
179 { 179 {
180 return toContainerNode(node.raw()); 180 return toContainerNode(node.raw());
181 } 181 }
182 182
183 inline ContainerNode::ContainerNode(const Handle<Document>& document, Constructi onType type) 183 inline ContainerNode::ContainerNode(const Handle<Document>& document, Constructi onType type)
184 : Node(document, type) 184 : Node(document, type)
185 , m_firstChild(0)
186 , m_lastChild(0)
187 { 185 {
188 } 186 }
189 187
190 inline void ContainerNode::attachChildren() 188 inline void ContainerNode::attachChildren()
191 { 189 {
192 for (Handle<Node> child = firstChild(); child; child = child->nextSibling()) { 190 for (Handle<Node> child = firstChild(); child; child = child->nextSibling()) {
193 HandleScope scope; 191 HandleScope scope;
194 ASSERT(!child->attached() || childAttachedAllowedWhenAttachingChildren(t his)); 192 ASSERT(!child->attached() || childAttachedAllowedWhenAttachingChildren(t his));
195 if (!child->attached()) 193 if (!child->attached())
196 child->attach(); 194 child->attach();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ASSERT(!nodes->size()); 277 ASSERT(!nodes->size());
280 for (Handle<Node> child = node->firstChild(); child; child = child->nextSibl ing()) { 278 for (Handle<Node> child = node->firstChild(); child; child = child->nextSibl ing()) {
281 NoHandleScope scope; 279 NoHandleScope scope;
282 nodes->append(child); 280 nodes->append(child);
283 } 281 }
284 } 282 }
285 283
286 284
287 class ChildNodesLazySnapshot { 285 class ChildNodesLazySnapshot {
288 WTF_MAKE_NONCOPYABLE(ChildNodesLazySnapshot); 286 WTF_MAKE_NONCOPYABLE(ChildNodesLazySnapshot);
289 WTF_MAKE_FAST_ALLOCATED;
290 DISALLOW_ALLOCATION() 287 DISALLOW_ALLOCATION()
291 public: 288 public:
292 explicit ChildNodesLazySnapshot(const Handle<Node>& parentNode) 289 explicit ChildNodesLazySnapshot(const Handle<Node>& parentNode)
293 : m_currentNode(parentNode->firstChild()) 290 : m_currentNode(parentNode->firstChild())
294 , m_currentIndex(0) 291 , m_currentIndex(0)
295 { 292 {
296 m_nextSnapshot = latestSnapshot; 293 m_nextSnapshot = latestSnapshot;
297 latestSnapshot = this; 294 latestSnapshot = this;
298 } 295 }
299 296
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 m_node->resumePostAttachCallbacks(); 363 m_node->resumePostAttachCallbacks();
367 } 364 }
368 365
369 private: 366 private:
370 Handle<ContainerNode> m_node; 367 Handle<ContainerNode> m_node;
371 }; 368 };
372 369
373 } // namespace WebCore 370 } // namespace WebCore
374 371
375 #endif // ContainerNode_h 372 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « Source/core/css/StyleRuleImport.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698