| 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, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 6 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 protected: | 77 protected: |
| 78 Document& document() const { return m_ownerNode->document(); } | 78 Document& document() const { return m_ownerNode->document(); } |
| 79 | 79 |
| 80 ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeLis
tRootType>(m_rootType); } | 80 ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeLis
tRootType>(m_rootType); } |
| 81 | 81 |
| 82 template <typename MatchFunc> | 82 template <typename MatchFunc> |
| 83 static Element* traverseMatchingElementsForwardToOffset(Element& currentElem
ent, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset,
MatchFunc); | 83 static Element* traverseMatchingElementsForwardToOffset(Element& currentElem
ent, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset,
MatchFunc); |
| 84 template <typename MatchFunc> | 84 template <typename MatchFunc> |
| 85 static Element* traverseMatchingElementsBackwardToOffset(Element& currentEle
ment, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset,
MatchFunc); | 85 static Element* traverseMatchingElementsBackwardToOffset(Element& currentEle
ment, const ContainerNode* stayWithin, unsigned offset, unsigned& currentOffset,
MatchFunc); |
| 86 | 86 |
| 87 virtual void trace(Visitor* visitor) { visitor->trace(m_ownerNode); } | 87 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(m_ownerNode); } |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 RefPtrWillBeMember<ContainerNode> m_ownerNode; // Cannot be null. | 90 RefPtrWillBeMember<ContainerNode> m_ownerNode; // Cannot be null. |
| 91 const unsigned m_rootType : 1; | 91 const unsigned m_rootType : 1; |
| 92 const unsigned m_invalidationType : 4; | 92 const unsigned m_invalidationType : 4; |
| 93 const unsigned m_collectionType : 5; | 93 const unsigned m_collectionType : 5; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 ALWAYS_INLINE bool LiveNodeListBase::shouldInvalidateTypeOnAttributeChange(NodeL
istInvalidationType type, const QualifiedName& attrName) | 96 ALWAYS_INLINE bool LiveNodeListBase::shouldInvalidateTypeOnAttributeChange(NodeL
istInvalidationType type, const QualifiedName& attrName) |
| 97 { | 97 { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 for (Element* previous = ElementTraversal::previous(currentElement, stayWith
in, isMatch); previous; previous = ElementTraversal::previous(*previous, stayWit
hin, isMatch)) { | 135 for (Element* previous = ElementTraversal::previous(currentElement, stayWith
in, isMatch); previous; previous = ElementTraversal::previous(*previous, stayWit
hin, isMatch)) { |
| 136 if (--currentOffset == offset) | 136 if (--currentOffset == offset) |
| 137 return previous; | 137 return previous; |
| 138 } | 138 } |
| 139 return 0; | 139 return 0; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| 143 | 143 |
| 144 #endif // LiveNodeListBase_h | 144 #endif // LiveNodeListBase_h |
| OLD | NEW |