diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-29 12:18:48 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-29 12:18:57 +0100 |
commit | 4c01d0526ba4dd8cff0c0ff22a6f0ab5eb973064 (patch) | |
tree | bed2fe914fe0f7ec70abfb47d2d84af8a3604d09 /Source/WebCore/html/HTMLCollection.cpp | |
parent | 01485457c9a5da3f1121015afd25bb53af77662e (diff) | |
download | qtwebkit-4c01d0526ba4dd8cff0c0ff22a6f0ab5eb973064.tar.gz |
Imported WebKit commit c60cfe0fc09efd257aa0111d7b133b02deb8a63e (http://svn.webkit.org/repository/webkit/trunk@136119)
New snapshot that includes the fix for installing the QtWebProcess into libexec
Change-Id: I01344e079cbdac5678c4cba6ffcc05f4597cf0d7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLCollection.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLCollection.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/WebCore/html/HTMLCollection.cpp b/Source/WebCore/html/HTMLCollection.cpp index df20954de..278f7931a 100644 --- a/Source/WebCore/html/HTMLCollection.cpp +++ b/Source/WebCore/html/HTMLCollection.cpp @@ -29,6 +29,7 @@ #include "HTMLObjectElement.h" #include "HTMLOptionElement.h" #include "NodeList.h" +#include "NodeRareData.h" #if ENABLE(MICRODATA) #include "HTMLPropertiesCollection.h" @@ -179,7 +180,6 @@ HTMLCollection::HTMLCollection(Node* ownerNode, CollectionType type, ItemAfterOv : LiveNodeListBase(ownerNode, rootTypeFromCollectionType(type), invalidationTypeExcludingIdAndNameAttributes(type), WebCore::shouldOnlyIncludeDirectChildren(type), type, itemAfterOverrideType) { - document()->registerNodeListCache(this); } PassRefPtr<HTMLCollection> HTMLCollection::create(Node* base, CollectionType type) @@ -189,16 +189,9 @@ PassRefPtr<HTMLCollection> HTMLCollection::create(Node* base, CollectionType typ HTMLCollection::~HTMLCollection() { - if (isUnnamedDocumentCachedType(type())) { - ASSERT(base()->isDocumentNode()); - static_cast<Document*>(base())->removeCachedHTMLCollection(this, type()); - } else if (isNodeCollectionType(type())) { - ASSERT(base()->isElementNode()); - toElement(base())->removeCachedHTMLCollection(this, type()); - } else // HTMLNameCollection removes cache by itself. - ASSERT(type() == WindowNamedItems || type() == DocumentNamedItems); - - document()->unregisterNodeListCache(this); + // HTMLNameCollection removes cache by itself. + if (type() != WindowNamedItems && type() != DocumentNamedItems) + ownerNode()->nodeLists()->removeCacheWithAtomicName(this, type()); } static inline bool isAcceptableElement(CollectionType type, Element* element) |