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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. |
5 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2014 Samsung Electronics. 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 14 matching lines...) Expand all Loading... |
25 #define HTMLCollection_h | 25 #define HTMLCollection_h |
26 | 26 |
27 #include "core/dom/LiveNodeListBase.h" | 27 #include "core/dom/LiveNodeListBase.h" |
28 #include "core/html/CollectionItemsCache.h" | 28 #include "core/html/CollectionItemsCache.h" |
29 #include "core/html/CollectionType.h" | 29 #include "core/html/CollectionType.h" |
30 #include "wtf/Forward.h" | 30 #include "wtf/Forward.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class HTMLCollection : public RefCountedWillBeGarbageCollectedFinalized<HTMLColl
ection>, public ScriptWrappable, public LiveNodeListBase { | 34 class HTMLCollection : public RefCountedWillBeGarbageCollectedFinalized<HTMLColl
ection>, public ScriptWrappable, public LiveNodeListBase { |
| 35 DEFINE_WRAPPERTYPEINFO(); |
35 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCollection); | 36 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCollection); |
36 public: | 37 public: |
37 enum ItemAfterOverrideType { | 38 enum ItemAfterOverrideType { |
38 OverridesItemAfter, | 39 OverridesItemAfter, |
39 DoesNotOverrideItemAfter, | 40 DoesNotOverrideItemAfter, |
40 }; | 41 }; |
41 | 42 |
42 static PassRefPtrWillBeRawPtr<HTMLCollection> create(ContainerNode& base, Co
llectionType); | 43 static PassRefPtrWillBeRawPtr<HTMLCollection> create(ContainerNode& base, Co
llectionType); |
43 virtual ~HTMLCollection(); | 44 virtual ~HTMLCollection(); |
44 virtual void invalidateCache(Document* oldDocument = 0) const OVERRIDE; | 45 virtual void invalidateCache(Document* oldDocument = 0) const OVERRIDE; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 DEFINE_TYPE_CASTS(HTMLCollection, LiveNodeListBase, collection, isHTMLCollection
Type(collection->type()), isHTMLCollectionType(collection.type())); | 155 DEFINE_TYPE_CASTS(HTMLCollection, LiveNodeListBase, collection, isHTMLCollection
Type(collection->type()), isHTMLCollectionType(collection.type())); |
155 | 156 |
156 inline void HTMLCollection::invalidateCacheForAttribute(const QualifiedName* att
rName) const | 157 inline void HTMLCollection::invalidateCacheForAttribute(const QualifiedName* att
rName) const |
157 { | 158 { |
158 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(), *
attrName)) | 159 if (!attrName || shouldInvalidateTypeOnAttributeChange(invalidationType(), *
attrName)) |
159 invalidateCache(); | 160 invalidateCache(); |
160 else if (*attrName == HTMLNames::idAttr || *attrName == HTMLNames::nameAttr) | 161 else if (*attrName == HTMLNames::idAttr || *attrName == HTMLNames::nameAttr) |
161 invalidateIdNameCacheMaps(); | 162 invalidateIdNameCacheMaps(); |
162 } | 163 } |
163 | 164 |
164 } // namespace | 165 } // namespace blink |
165 | 166 |
166 #endif | 167 #endif // HTMLCollection_h |
OLD | NEW |