| OLD | NEW |
| 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 Loading... |
| 292 return toContainerNode(this)->firstChild(); | 292 return toContainerNode(this)->firstChild(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 inline Node* Node::lastChild() const | 295 inline Node* Node::lastChild() const |
| 296 { | 296 { |
| 297 if (!isContainerNode()) | 297 if (!isContainerNode()) |
| 298 return 0; | 298 return 0; |
| 299 return toContainerNode(this)->lastChild(); | 299 return toContainerNode(this)->lastChild(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 inline Node& Node::highestAncestor() const | 302 inline Node& Node::highestAncestorOrSelf() const |
| 303 { | 303 { |
| 304 Node* node = const_cast<Node*>(this); | 304 Node* node = const_cast<Node*>(this); |
| 305 Node* highest = node; | 305 Node* highest = node; |
| 306 for (; node; node = node->parentNode()) | 306 for (; node; node = node->parentNode()) |
| 307 highest = node; | 307 highest = node; |
| 308 return *highest; | 308 return *highest; |
| 309 } | 309 } |
| 310 | 310 |
| 311 inline ContainerNode* Node::parentElementOrShadowRoot() const | 311 inline ContainerNode* Node::parentElementOrShadowRoot() const |
| 312 { | 312 { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 RefPtr<Node> m_currentNode; | 389 RefPtr<Node> m_currentNode; |
| 390 unsigned m_currentIndex; | 390 unsigned m_currentIndex; |
| 391 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated. | 391 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated. |
| 392 ChildNodesLazySnapshot* m_nextSnapshot; | 392 ChildNodesLazySnapshot* m_nextSnapshot; |
| 393 }; | 393 }; |
| 394 | 394 |
| 395 } // namespace WebCore | 395 } // namespace WebCore |
| 396 | 396 |
| 397 #endif // ContainerNode_h | 397 #endif // ContainerNode_h |
| OLD | NEW |