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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "core/dom/ExceptionCodePlaceholder.h" | 27 #include "core/dom/ExceptionCodePlaceholder.h" |
28 #include "core/dom/Node.h" | 28 #include "core/dom/Node.h" |
29 | 29 |
30 #include <wtf/OwnPtr.h> | 30 #include <wtf/OwnPtr.h> |
31 #include <wtf/Vector.h> | 31 #include <wtf/Vector.h> |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class FloatPoint; | 35 class FloatPoint; |
36 | 36 class HTMLCollection; |
| 37 |
37 typedef void (*NodeCallback)(Node*, unsigned); | 38 typedef void (*NodeCallback)(Node*, unsigned); |
38 | 39 |
39 namespace Private { | 40 namespace Private { |
40 template<class GenericNode, class GenericNodeContainer> | 41 template<class GenericNode, class GenericNodeContainer> |
41 void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, Ge
nericNodeContainer*); | 42 void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, Ge
nericNodeContainer*); |
42 }; | 43 }; |
43 | 44 |
44 class NoEventDispatchAssertion { | 45 class NoEventDispatchAssertion { |
45 public: | 46 public: |
46 NoEventDispatchAssertion() | 47 NoEventDispatchAssertion() |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 80 |
80 class ContainerNode : public Node { | 81 class ContainerNode : public Node { |
81 friend class PostAttachCallbackDisabler; | 82 friend class PostAttachCallbackDisabler; |
82 public: | 83 public: |
83 virtual ~ContainerNode(); | 84 virtual ~ContainerNode(); |
84 | 85 |
85 Node* firstChild() const { return m_firstChild; } | 86 Node* firstChild() const { return m_firstChild; } |
86 Node* lastChild() const { return m_lastChild; } | 87 Node* lastChild() const { return m_lastChild; } |
87 bool hasChildNodes() const { return m_firstChild; } | 88 bool hasChildNodes() const { return m_firstChild; } |
88 | 89 |
| 90 // ParentNode interface API |
| 91 PassRefPtr<HTMLCollection> children(); |
| 92 Element* firstElementChild() const; |
| 93 Element* lastElementChild() const; |
| 94 unsigned childElementCount() const; |
| 95 |
89 unsigned childNodeCount() const; | 96 unsigned childNodeCount() const; |
90 Node* childNode(unsigned index) const; | 97 Node* childNode(unsigned index) const; |
91 | 98 |
92 bool insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionCode&
= ASSERT_NO_EXCEPTION, AttachBehavior = AttachNow); | 99 bool insertBefore(PassRefPtr<Node> newChild, Node* refChild, ExceptionCode&
= ASSERT_NO_EXCEPTION, AttachBehavior = AttachNow); |
93 bool replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionCode&
= ASSERT_NO_EXCEPTION, AttachBehavior = AttachNow); | 100 bool replaceChild(PassRefPtr<Node> newChild, Node* oldChild, ExceptionCode&
= ASSERT_NO_EXCEPTION, AttachBehavior = AttachNow); |
94 bool removeChild(Node* child, ExceptionCode& = ASSERT_NO_EXCEPTION); | 101 bool removeChild(Node* child, ExceptionCode& = ASSERT_NO_EXCEPTION); |
95 bool appendChild(PassRefPtr<Node> newChild, ExceptionCode& = ASSERT_NO_EXCEP
TION, AttachBehavior = AttachNow); | 102 bool appendChild(PassRefPtr<Node> newChild, ExceptionCode& = ASSERT_NO_EXCEP
TION, AttachBehavior = AttachNow); |
96 | 103 |
97 // These methods are only used during parsing. | 104 // These methods are only used during parsing. |
98 // They don't send DOM mutation events or handle reparenting. | 105 // They don't send DOM mutation events or handle reparenting. |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 m_node->resumePostAttachCallbacks(); | 359 m_node->resumePostAttachCallbacks(); |
353 } | 360 } |
354 | 361 |
355 private: | 362 private: |
356 ContainerNode* m_node; | 363 ContainerNode* m_node; |
357 }; | 364 }; |
358 | 365 |
359 } // namespace WebCore | 366 } // namespace WebCore |
360 | 367 |
361 #endif // ContainerNode_h | 368 #endif // ContainerNode_h |
OLD | NEW |