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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/dom/CharacterData.cpp ('k') | Source/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 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 PassRefPtr<Node> nextNode() 292 PassRefPtr<Node> nextNode()
293 { 293 {
294 if (LIKELY(!hasSnapshot())) { 294 if (LIKELY(!hasSnapshot())) {
295 RefPtr<Node> node = m_currentNode; 295 RefPtr<Node> node = m_currentNode;
296 if (node) 296 if (node)
297 m_currentNode = node->nextSibling(); 297 m_currentNode = node->nextSibling();
298 return node.release(); 298 return node.release();
299 } 299 }
300 Vector<RefPtr<Node> >& nodeVector = *m_childNodes; 300 Vector<RefPtr<Node> >& nodeVector = *m_childNodes;
301 if (m_currentIndex >= nodeVector.size()) 301 if (m_currentIndex >= nodeVector.size())
302 return 0; 302 return nullptr;
303 return nodeVector[m_currentIndex++]; 303 return nodeVector[m_currentIndex++];
304 } 304 }
305 305
306 void takeSnapshot() 306 void takeSnapshot()
307 { 307 {
308 if (hasSnapshot()) 308 if (hasSnapshot())
309 return; 309 return;
310 m_childNodes = adoptPtr(new Vector<RefPtr<Node> >()); 310 m_childNodes = adoptPtr(new Vector<RefPtr<Node> >());
311 Node* node = m_currentNode.get(); 311 Node* node = m_currentNode.get();
312 while (node) { 312 while (node) {
(...skipping 19 matching lines...) Expand all
332 332
333 RefPtr<Node> m_currentNode; 333 RefPtr<Node> m_currentNode;
334 unsigned m_currentIndex; 334 unsigned m_currentIndex;
335 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated. 335 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated.
336 ChildNodesLazySnapshot* m_nextSnapshot; 336 ChildNodesLazySnapshot* m_nextSnapshot;
337 }; 337 };
338 338
339 } // namespace WebCore 339 } // namespace WebCore
340 340
341 #endif // ContainerNode_h 341 #endif // ContainerNode_h
OLDNEW
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698