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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 document().unregisterNodeList(this); | 59 document().unregisterNodeList(this); |
60 } | 60 } |
61 | 61 |
62 ContainerNode& rootNode() const; | 62 ContainerNode& rootNode() const; |
63 | 63 |
64 void didMoveToDocument(Document& oldDocument, Document& newDocument); | 64 void didMoveToDocument(Document& oldDocument, Document& newDocument); |
65 ALWAYS_INLINE bool hasIdNameCache() const { return !isLiveNodeListType(type(
)); } | 65 ALWAYS_INLINE bool hasIdNameCache() const { return !isLiveNodeListType(type(
)); } |
66 ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeLis
tIsRootedAtDocument || m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemref
Attr; } | 66 ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeLis
tIsRootedAtDocument || m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemref
Attr; } |
67 ALWAYS_INLINE NodeListInvalidationType invalidationType() const { return sta
tic_cast<NodeListInvalidationType>(m_invalidationType); } | 67 ALWAYS_INLINE NodeListInvalidationType invalidationType() const { return sta
tic_cast<NodeListInvalidationType>(m_invalidationType); } |
68 ALWAYS_INLINE CollectionType type() const { return static_cast<CollectionTyp
e>(m_collectionType); } | 68 ALWAYS_INLINE CollectionType type() const { return static_cast<CollectionTyp
e>(m_collectionType); } |
69 ContainerNode* ownerNode() const { return m_ownerNode.get(); } | 69 ContainerNode& ownerNode() const { return *m_ownerNode; } |
70 ALWAYS_INLINE void invalidateCache(const QualifiedName* attrName) const | 70 ALWAYS_INLINE void invalidateCache(const QualifiedName* attrName) const |
71 { | 71 { |
72 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(
), *attrName)) | 72 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(
), *attrName)) |
73 invalidateCache(); | 73 invalidateCache(); |
74 else if (hasIdNameCache() && (*attrName == HTMLNames::idAttr || *attrNam
e == HTMLNames::nameAttr)) | 74 else if (hasIdNameCache() && (*attrName == HTMLNames::idAttr || *attrNam
e == HTMLNames::nameAttr)) |
75 invalidateIdNameCacheMaps(); | 75 invalidateIdNameCacheMaps(); |
76 } | 76 } |
77 virtual void invalidateCache(Document* oldDocument = 0) const = 0; | 77 virtual void invalidateCache(Document* oldDocument = 0) const = 0; |
78 | 78 |
79 static bool shouldInvalidateTypeOnAttributeChange(NodeListInvalidationType,
const QualifiedName&); | 79 static bool shouldInvalidateTypeOnAttributeChange(NodeListInvalidationType,
const QualifiedName&); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 return false; | 117 return false; |
118 case InvalidateOnAnyAttrChange: | 118 case InvalidateOnAnyAttrChange: |
119 return true; | 119 return true; |
120 } | 120 } |
121 return false; | 121 return false; |
122 } | 122 } |
123 | 123 |
124 } // namespace WebCore | 124 } // namespace WebCore |
125 | 125 |
126 #endif // LiveNodeListBase_h | 126 #endif // LiveNodeListBase_h |
OLD | NEW |