summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLNameCollection.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-29 12:18:48 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-29 12:18:57 +0100
commit4c01d0526ba4dd8cff0c0ff22a6f0ab5eb973064 (patch)
treebed2fe914fe0f7ec70abfb47d2d84af8a3604d09 /Source/WebCore/html/HTMLNameCollection.cpp
parent01485457c9a5da3f1121015afd25bb53af77662e (diff)
downloadqtwebkit-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/HTMLNameCollection.cpp')
-rw-r--r--Source/WebCore/html/HTMLNameCollection.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/WebCore/html/HTMLNameCollection.cpp b/Source/WebCore/html/HTMLNameCollection.cpp
index 36c7350a4..9e48527e9 100644
--- a/Source/WebCore/html/HTMLNameCollection.cpp
+++ b/Source/WebCore/html/HTMLNameCollection.cpp
@@ -27,12 +27,13 @@
#include "HTMLDocument.h"
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
+#include "NodeRareData.h"
namespace WebCore {
using namespace HTMLNames;
-HTMLNameCollection::HTMLNameCollection(Document* document, CollectionType type, const AtomicString& name)
+HTMLNameCollection::HTMLNameCollection(Node* document, CollectionType type, const AtomicString& name)
: HTMLCollection(document, type, OverridesItemAfter)
, m_name(name)
{
@@ -43,10 +44,8 @@ HTMLNameCollection::~HTMLNameCollection()
ASSERT(base());
ASSERT(base()->isDocumentNode());
ASSERT(type() == WindowNamedItems || type() == DocumentNamedItems);
- if (type() == WindowNamedItems)
- static_cast<Document*>(base())->removeWindowNamedItemCache(this, m_name);
- else
- static_cast<Document*>(base())->removeDocumentNamedItemCache(this, m_name);
+
+ ownerNode()->nodeLists()->removeCacheWithAtomicName(this, type(), m_name);
}
Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element* previous) const