| Index: Source/core/html/HTMLCollection.cpp
|
| diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp
|
| index b66fa9d26d5ea5003523c4402deb4ef231e56878..42f5c65f8be8be9ae8f8a78990043b065f57cb05 100644
|
| --- a/Source/core/html/HTMLCollection.cpp
|
| +++ b/Source/core/html/HTMLCollection.cpp
|
| @@ -175,11 +175,9 @@ HTMLCollection::~HTMLCollection()
|
| {
|
| if (hasValidIdNameCache())
|
| unregisterIdNameCacheFromDocument(document());
|
| - // HTMLNameCollection, ClassCollection and TagCollection remove cache by themselves.
|
| - if (type() != WindowNamedItems && type() != DocumentNamedItems && type() != ClassCollectionType
|
| - && type() != HTMLTagCollectionType && type() != TagCollectionType) {
|
| + // Named HTMLCollection types remove cache by themselves.
|
| + if (isUnnamedHTMLCollectionType(type()))
|
| ownerNode().nodeLists()->removeCache(this, type());
|
| - }
|
| }
|
|
|
| void HTMLCollection::invalidateCache(Document* oldDocument) const
|
|
|