Make it compile.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Nov 2013 14:35:47 +0000 (14:35 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Nov 2013 14:35:47 +0000 (14:35 +0000)
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/LiveNodeList.h
Source/WebCore/dom/NodeRareData.h
Source/WebCore/html/HTMLCollection.cpp

index cd71c3b..6288520 100644 (file)
@@ -1,5 +1,18 @@
 2013-11-05  Antti Koivisto  <antti@apple.com>
 
+        Make it compile.
+
+        * dom/LiveNodeList.h:
+        (WebCore::LiveNodeList::LiveNodeList):
+        (WebCore::LiveNodeList::~LiveNodeList):
+        * dom/NodeRareData.h:
+        (WebCore::NodeListsNodeData::adoptDocument):
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::HTMLCollection):
+        (WebCore::HTMLCollection::~HTMLCollection):
+
+2013-11-05  Antti Koivisto  <antti@apple.com>
+
         HTMLCollection should not be NodeList
         https://bugs.webkit.org/show_bug.cgi?id=123794
 
index 28e7cad..b1dcc00 100644 (file)
@@ -66,14 +66,14 @@ public:
         ASSERT(m_invalidationType == static_cast<unsigned>(invalidationType));
         ASSERT(m_type == static_cast<unsigned>(type));
 
-        document().registerNodeList(this);
+        document().registerNodeList(*this);
     }
     virtual Node* namedItem(const AtomicString&) const OVERRIDE;
     virtual bool nodeMatches(Element*) const = 0;
 
     virtual ~LiveNodeList()
     {
-        document().unregisterNodeList(this);
+        document().unregisterNodeList(*this);
     }
 
     // DOM API
index bb82bbb..a4880f8 100644 (file)
@@ -229,26 +229,26 @@ public:
 
         if (oldDocument != newDocument) {
             for (auto it = m_atomicNameCaches.begin(), end = m_atomicNameCaches.end(); it != end; ++it) {
-                LiveNodeList* list = it->value;
+                LiveNodeList& list = *it->value;
                 oldDocument->unregisterNodeList(list);
                 newDocument->registerNodeList(list);
             }
 
             for (auto it = m_nameCaches.begin(), end = m_nameCaches.end(); it != end; ++it) {
-                LiveNodeList* list = it->value;
+                LiveNodeList& list = *it->value;
                 oldDocument->unregisterNodeList(list);
                 newDocument->registerNodeList(list);
             }
 
             for (auto it = m_tagNodeListCacheNS.begin(), end = m_tagNodeListCacheNS.end(); it != end; ++it) {
-                LiveNodeList* list = it->value;
-                ASSERT(!list->isRootedAtDocument());
+                LiveNodeList& list = *it->value;
+                ASSERT(!list.isRootedAtDocument());
                 oldDocument->unregisterNodeList(list);
                 newDocument->registerNodeList(list);
             }
 
             for (auto it = m_cachedCollections.begin(), end = m_cachedCollections.end(); it != end; ++it) {
-                HTMLCollection* collection = it->value;
+                HTMLCollection& collection = *it->value;
                 oldDocument->unregisterCollection(collection);
                 newDocument->registerCollection(collection);
             }
index 25dd01e..3aa3a63 100644 (file)
@@ -148,7 +148,7 @@ HTMLCollection::HTMLCollection(ContainerNode& ownerNode, CollectionType type, It
     ASSERT(m_invalidationType == static_cast<unsigned>(invalidationTypeExcludingIdAndNameAttributes(type)));
     ASSERT(m_collectionType == static_cast<unsigned>(type));
 
-    document().registerCollection(this);
+    document().registerCollection(*this);
 }
 
 PassRefPtr<HTMLCollection> HTMLCollection::create(ContainerNode& base, CollectionType type)
@@ -158,7 +158,7 @@ PassRefPtr<HTMLCollection> HTMLCollection::create(ContainerNode& base, Collectio
 
 HTMLCollection::~HTMLCollection()
 {
-    document().unregisterCollection(this);
+    document().unregisterCollection(*this);
     // HTMLNameCollection removes cache by itself.
     if (type() != WindowNamedItems && type() != DocumentNamedItems)
         ownerNode().nodeLists()->removeCachedCollection(this);