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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 176933013: Pass rootNode by reference when constructing node lists / collections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 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/NameNodeList.cpp ('k') | Source/core/dom/NodeRareData.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, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 352
353 void Node::setNodeValue(const String&) 353 void Node::setNodeValue(const String&)
354 { 354 {
355 // By default, setting nodeValue has no effect. 355 // By default, setting nodeValue has no effect.
356 } 356 }
357 357
358 PassRefPtr<NodeList> Node::childNodes() 358 PassRefPtr<NodeList> Node::childNodes()
359 { 359 {
360 if (isContainerNode()) 360 if (isContainerNode())
361 return ensureRareData().ensureNodeLists().ensureChildNodeList(toContaine rNode(this)); 361 return ensureRareData().ensureNodeLists().ensureChildNodeList(toContaine rNode(*this));
362 return ensureRareData().ensureNodeLists().ensureEmptyChildNodeList(this); 362 return ensureRareData().ensureNodeLists().ensureEmptyChildNodeList(*this);
363 } 363 }
364 364
365 Node& Node::lastDescendant() const 365 Node& Node::lastDescendant() const
366 { 366 {
367 Node* n = const_cast<Node*>(this); 367 Node* n = const_cast<Node*>(this);
368 while (n && n->lastChild()) 368 while (n && n->lastChild())
369 n = n->lastChild(); 369 n = n->lastChild();
370 ASSERT(n); 370 ASSERT(n);
371 return *n; 371 return *n;
372 } 372 }
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2557 node->showTreeForThis(); 2557 node->showTreeForThis();
2558 } 2558 }
2559 2559
2560 void showNodePath(const WebCore::Node* node) 2560 void showNodePath(const WebCore::Node* node)
2561 { 2561 {
2562 if (node) 2562 if (node)
2563 node->showNodePathForThis(); 2563 node->showNodePathForThis();
2564 } 2564 }
2565 2565
2566 #endif 2566 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/NameNodeList.cpp ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698