| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 public: | 80 public: |
| 81 virtual ~ContainerNode(); | 81 virtual ~ContainerNode(); |
| 82 | 82 |
| 83 Node* firstChild() const { return m_firstChild; } | 83 Node* firstChild() const { return m_firstChild; } |
| 84 Node* lastChild() const { return m_lastChild; } | 84 Node* lastChild() const { return m_lastChild; } |
| 85 bool hasChildNodes() const { return m_firstChild; } | 85 bool hasChildNodes() const { return m_firstChild; } |
| 86 | 86 |
| 87 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling
(); } | 87 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling
(); } |
| 88 bool hasOneTextChild() const { return hasOneChild() && m_firstChild->isTextN
ode(); } | 88 bool hasOneTextChild() const { return hasOneChild() && m_firstChild->isTextN
ode(); } |
| 89 | 89 |
| 90 // ParentNode interface API | |
| 91 PassRefPtr<HTMLCollection> children(); | 90 PassRefPtr<HTMLCollection> children(); |
| 92 Element* firstElementChild() const; | |
| 93 Element* lastElementChild() const; | |
| 94 unsigned childElementCount() const; | |
| 95 | 91 |
| 96 unsigned childNodeCount() const; | 92 unsigned childNodeCount() const; |
| 97 Node* childNode(unsigned index) const; | 93 Node* childNode(unsigned index) const; |
| 98 | 94 |
| 99 PassRefPtr<Element> querySelector(const AtomicString& selectors, ExceptionSt
ate&); | 95 PassRefPtr<Element> querySelector(const AtomicString& selectors, ExceptionSt
ate&); |
| 100 PassRefPtr<NodeList> querySelectorAll(const AtomicString& selectors, Excepti
onState&); | 96 PassRefPtr<NodeList> querySelectorAll(const AtomicString& selectors, Excepti
onState&); |
| 101 | 97 |
| 102 void insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState&
= ASSERT_NO_EXCEPTION); | 98 void insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionState&
= ASSERT_NO_EXCEPTION); |
| 103 void replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState&
= ASSERT_NO_EXCEPTION); | 99 void replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionState&
= ASSERT_NO_EXCEPTION); |
| 104 void removeChild(Node* child, ExceptionState& = ASSERT_NO_EXCEPTION); | 100 void removeChild(Node* child, ExceptionState& = ASSERT_NO_EXCEPTION); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 315 |
| 320 RefPtr<Node> m_currentNode; | 316 RefPtr<Node> m_currentNode; |
| 321 unsigned m_currentIndex; | 317 unsigned m_currentIndex; |
| 322 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated. | 318 OwnPtr<Vector<RefPtr<Node> > > m_childNodes; // Lazily instantiated. |
| 323 ChildNodesLazySnapshot* m_nextSnapshot; | 319 ChildNodesLazySnapshot* m_nextSnapshot; |
| 324 }; | 320 }; |
| 325 | 321 |
| 326 } // namespace WebCore | 322 } // namespace WebCore |
| 327 | 323 |
| 328 #endif // ContainerNode_h | 324 #endif // ContainerNode_h |
| OLD | NEW |