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

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

Issue 239703007: Rename Node::lastDescendant() / Node::highestAncestor() for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename highestAncestor() as well Created 6 years, 8 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/Node.h ('k') | Source/core/editing/ApplyStyleCommand.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, 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // By default, setting nodeValue has no effect. 356 // By default, setting nodeValue has no effect.
357 } 357 }
358 358
359 PassRefPtr<NodeList> Node::childNodes() 359 PassRefPtr<NodeList> Node::childNodes()
360 { 360 {
361 if (isContainerNode()) 361 if (isContainerNode())
362 return ensureRareData().ensureNodeLists().ensureChildNodeList(toContaine rNode(*this)); 362 return ensureRareData().ensureNodeLists().ensureChildNodeList(toContaine rNode(*this));
363 return ensureRareData().ensureNodeLists().ensureEmptyChildNodeList(*this); 363 return ensureRareData().ensureNodeLists().ensureEmptyChildNodeList(*this);
364 } 364 }
365 365
366 Node& Node::lastDescendant() const 366 Node& Node::lastDescendantOrSelf() const
367 { 367 {
368 Node* n = const_cast<Node*>(this); 368 Node* n = const_cast<Node*>(this);
369 while (n && n->lastChild()) 369 while (n && n->lastChild())
370 n = n->lastChild(); 370 n = n->lastChild();
371 ASSERT(n); 371 ASSERT(n);
372 return *n; 372 return *n;
373 } 373 }
374 374
375 Node* Node::pseudoAwarePreviousSibling() const 375 Node* Node::pseudoAwarePreviousSibling() const
376 { 376 {
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2537 node->showTreeForThis(); 2537 node->showTreeForThis();
2538 } 2538 }
2539 2539
2540 void showNodePath(const WebCore::Node* node) 2540 void showNodePath(const WebCore::Node* node)
2541 { 2541 {
2542 if (node) 2542 if (node)
2543 node->showNodePathForThis(); 2543 node->showNodePathForThis();
2544 } 2544 }
2545 2545
2546 #endif 2546 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698