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-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 bool hasTagName(const HTMLQualifiedName&) const; | 137 bool hasTagName(const HTMLQualifiedName&) const; |
138 virtual String nodeName() const = 0; | 138 virtual String nodeName() const = 0; |
139 virtual NodeType nodeType() const = 0; | 139 virtual NodeType nodeType() const = 0; |
140 ContainerNode* parentNode() const; | 140 ContainerNode* parentNode() const; |
141 Element* parentElement() const; | 141 Element* parentElement() const; |
142 Node* previousSibling() const { return m_previous; } | 142 Node* previousSibling() const { return m_previous; } |
143 Node* nextSibling() const { return m_next; } | 143 Node* nextSibling() const { return m_next; } |
144 Node* firstChild() const; | 144 Node* firstChild() const; |
145 Node* lastChild() const; | 145 Node* lastChild() const; |
146 | 146 |
| 147 Element* previousElementSibling(); |
| 148 Element* nextElementSibling(); |
| 149 |
| 150 // These functions release the nodes from |nodes|. |
| 151 void newInsertBefore(Vector<RefPtr<Node>>& nodes, ExceptionState&); |
| 152 void newInsertAfter(Vector<RefPtr<Node>>& nodes, ExceptionState&); |
| 153 void replaceWith(Vector<RefPtr<Node>>& nodes, ExceptionState&); |
| 154 |
147 void remove(ExceptionState&); | 155 void remove(ExceptionState&); |
148 | 156 |
149 // These should all actually return a node, but this is only important for l
anguage bindings, | 157 // These should all actually return a node, but this is only important for l
anguage bindings, |
150 // which will already know and hold a ref on the right node to return. | 158 // which will already know and hold a ref on the right node to return. |
151 PassRefPtr<Node> insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exc
eptionState& = ASSERT_NO_EXCEPTION); | 159 PassRefPtr<Node> insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exc
eptionState& = ASSERT_NO_EXCEPTION); |
152 PassRefPtr<Node> replaceChild(PassRefPtr<Node> newChild, PassRefPtr<Node> ol
dChild, ExceptionState& = ASSERT_NO_EXCEPTION); | 160 PassRefPtr<Node> replaceChild(PassRefPtr<Node> newChild, PassRefPtr<Node> ol
dChild, ExceptionState& = ASSERT_NO_EXCEPTION); |
153 PassRefPtr<Node> removeChild(PassRefPtr<Node> child, ExceptionState& = ASSER
T_NO_EXCEPTION); | 161 PassRefPtr<Node> removeChild(PassRefPtr<Node> child, ExceptionState& = ASSER
T_NO_EXCEPTION); |
154 PassRefPtr<Node> appendChild(PassRefPtr<Node> newChild, ExceptionState& = AS
SERT_NO_EXCEPTION); | 162 PassRefPtr<Node> appendChild(PassRefPtr<Node> newChild, ExceptionState& = AS
SERT_NO_EXCEPTION); |
155 | 163 |
156 bool hasChildren() const { return firstChild(); } | 164 bool hasChildren() const { return firstChild(); } |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 { | 341 { |
334 return treeScope().document(); | 342 return treeScope().document(); |
335 } | 343 } |
336 | 344 |
337 TreeScope& treeScope() const | 345 TreeScope& treeScope() const |
338 { | 346 { |
339 ASSERT(m_treeScope); | 347 ASSERT(m_treeScope); |
340 return *m_treeScope; | 348 return *m_treeScope; |
341 } | 349 } |
342 | 350 |
343 ContainerNode* ownerScope() const; | 351 ContainerNode* owner() const; |
344 | 352 |
345 bool inActiveDocument() const; | 353 bool inActiveDocument() const; |
346 | 354 |
347 // Returns true if this node is associated with a document and is in its ass
ociated document's | 355 // Returns true if this node is associated with a document and is in its ass
ociated document's |
348 // node tree, false otherwise. | 356 // node tree, false otherwise. |
349 bool inDocument() const | 357 bool inDocument() const |
350 { | 358 { |
351 return getFlag(InDocumentFlag); | 359 return getFlag(InDocumentFlag); |
352 } | 360 } |
353 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } | 361 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } // namespace blink | 685 } // namespace blink |
678 | 686 |
679 #ifndef NDEBUG | 687 #ifndef NDEBUG |
680 // Outside the WebCore namespace for ease of invocation from gdb. | 688 // Outside the WebCore namespace for ease of invocation from gdb. |
681 void showNode(const blink::Node*); | 689 void showNode(const blink::Node*); |
682 void showTree(const blink::Node*); | 690 void showTree(const blink::Node*); |
683 void showNodePath(const blink::Node*); | 691 void showNodePath(const blink::Node*); |
684 #endif | 692 #endif |
685 | 693 |
686 #endif // SKY_ENGINE_CORE_DOM_NODE_H_ | 694 #endif // SKY_ENGINE_CORE_DOM_NODE_H_ |
OLD | NEW |