| 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, 2013 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2013 Apple Inc. All r
ights 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 18 matching lines...) Expand all Loading... |
| 29 #include "core/html/CollectionType.h" | 29 #include "core/html/CollectionType.h" |
| 30 #include "wtf/OwnPtr.h" | 30 #include "wtf/OwnPtr.h" |
| 31 #include "wtf/Vector.h" | 31 #include "wtf/Vector.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ClassCollection; | 35 class ClassCollection; |
| 36 class ExceptionState; | 36 class ExceptionState; |
| 37 class FloatPoint; | 37 class FloatPoint; |
| 38 class HTMLCollection; | 38 class HTMLCollection; |
| 39 class StaticNodeList; | 39 template <typename NodeType> class StaticNodeTypeList; |
| 40 typedef StaticNodeTypeList<Element> StaticElementList; |
| 40 class TagCollection; | 41 class TagCollection; |
| 41 | 42 |
| 42 enum DynamicRestyleFlags { | 43 enum DynamicRestyleFlags { |
| 43 ChildrenOrSiblingsAffectedByFocus = 1 << 0, | 44 ChildrenOrSiblingsAffectedByFocus = 1 << 0, |
| 44 ChildrenOrSiblingsAffectedByHover = 1 << 1, | 45 ChildrenOrSiblingsAffectedByHover = 1 << 1, |
| 45 ChildrenOrSiblingsAffectedByActive = 1 << 2, | 46 ChildrenOrSiblingsAffectedByActive = 1 << 2, |
| 46 ChildrenOrSiblingsAffectedByDrag = 1 << 3, | 47 ChildrenOrSiblingsAffectedByDrag = 1 << 3, |
| 47 ChildrenAffectedByFirstChildRules = 1 << 4, | 48 ChildrenAffectedByFirstChildRules = 1 << 4, |
| 48 ChildrenAffectedByLastChildRules = 1 << 5, | 49 ChildrenAffectedByLastChildRules = 1 << 5, |
| 49 ChildrenAffectedByDirectAdjacentRules = 1 << 6, | 50 ChildrenAffectedByDirectAdjacentRules = 1 << 6, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 70 | 71 |
| 71 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling
(); } | 72 bool hasOneChild() const { return m_firstChild && !m_firstChild->nextSibling
(); } |
| 72 bool hasOneTextChild() const { return hasOneChild() && m_firstChild->isTextN
ode(); } | 73 bool hasOneTextChild() const { return hasOneChild() && m_firstChild->isTextN
ode(); } |
| 73 bool hasChildCount(unsigned) const; | 74 bool hasChildCount(unsigned) const; |
| 74 | 75 |
| 75 PassRefPtrWillBeRawPtr<HTMLCollection> children(); | 76 PassRefPtrWillBeRawPtr<HTMLCollection> children(); |
| 76 | 77 |
| 77 unsigned countChildren() const; | 78 unsigned countChildren() const; |
| 78 | 79 |
| 79 PassRefPtrWillBeRawPtr<Element> querySelector(const AtomicString& selectors,
ExceptionState&); | 80 PassRefPtrWillBeRawPtr<Element> querySelector(const AtomicString& selectors,
ExceptionState&); |
| 80 PassRefPtrWillBeRawPtr<StaticNodeList> querySelectorAll(const AtomicString&
selectors, ExceptionState&); | 81 PassRefPtrWillBeRawPtr<StaticElementList> querySelectorAll(const AtomicStrin
g& selectors, ExceptionState&); |
| 81 | 82 |
| 82 PassRefPtrWillBeRawPtr<Node> insertBefore(PassRefPtrWillBeRawPtr<Node> newCh
ild, Node* refChild, ExceptionState& = ASSERT_NO_EXCEPTION); | 83 PassRefPtrWillBeRawPtr<Node> insertBefore(PassRefPtrWillBeRawPtr<Node> newCh
ild, Node* refChild, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 83 PassRefPtrWillBeRawPtr<Node> replaceChild(PassRefPtrWillBeRawPtr<Node> newCh
ild, PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& = ASSERT_NO_EXCEPTIO
N); | 84 PassRefPtrWillBeRawPtr<Node> replaceChild(PassRefPtrWillBeRawPtr<Node> newCh
ild, PassRefPtrWillBeRawPtr<Node> oldChild, ExceptionState& = ASSERT_NO_EXCEPTIO
N); |
| 84 PassRefPtrWillBeRawPtr<Node> removeChild(PassRefPtrWillBeRawPtr<Node> child,
ExceptionState& = ASSERT_NO_EXCEPTION); | 85 PassRefPtrWillBeRawPtr<Node> removeChild(PassRefPtrWillBeRawPtr<Node> child,
ExceptionState& = ASSERT_NO_EXCEPTION); |
| 85 PassRefPtrWillBeRawPtr<Node> appendChild(PassRefPtrWillBeRawPtr<Node> newChi
ld, ExceptionState& = ASSERT_NO_EXCEPTION); | 86 PassRefPtrWillBeRawPtr<Node> appendChild(PassRefPtrWillBeRawPtr<Node> newChi
ld, ExceptionState& = ASSERT_NO_EXCEPTION); |
| 86 | 87 |
| 87 Element* getElementById(const AtomicString& id) const; | 88 Element* getElementById(const AtomicString& id) const; |
| 88 PassRefPtrWillBeRawPtr<TagCollection> getElementsByTagName(const AtomicStrin
g&); | 89 PassRefPtrWillBeRawPtr<TagCollection> getElementsByTagName(const AtomicStrin
g&); |
| 89 PassRefPtrWillBeRawPtr<TagCollection> getElementsByTagNameNS(const AtomicStr
ing& namespaceURI, const AtomicString& localName); | 90 PassRefPtrWillBeRawPtr<TagCollection> getElementsByTagNameNS(const AtomicStr
ing& namespaceURI, const AtomicString& localName); |
| 90 PassRefPtrWillBeRawPtr<NameNodeList> getElementsByName(const AtomicString& e
lementName); | 91 PassRefPtrWillBeRawPtr<NameNodeList> getElementsByName(const AtomicString& e
lementName); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) | 341 inline void getChildNodes(ContainerNode& node, NodeVector& nodes) |
| 341 { | 342 { |
| 342 ASSERT(!nodes.size()); | 343 ASSERT(!nodes.size()); |
| 343 for (Node* child = node.firstChild(); child; child = child->nextSibling()) | 344 for (Node* child = node.firstChild(); child; child = child->nextSibling()) |
| 344 nodes.append(child); | 345 nodes.append(child); |
| 345 } | 346 } |
| 346 | 347 |
| 347 } // namespace blink | 348 } // namespace blink |
| 348 | 349 |
| 349 #endif // ContainerNode_h | 350 #endif // ContainerNode_h |
| OLD | NEW |