Get rid of HTMLCollectionCacheBase
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2012 20:06:27 +0000 (20:06 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2012 20:06:27 +0000 (20:06 +0000)
commit156d89660759b989071580fb6f884cba9517fd92
treed33ab9581a948b982442749f8903d9928cc4582a
parentcc930b8e9ce53135f865725fa50abc321e7d3b6a
Get rid of HTMLCollectionCacheBase
https://bugs.webkit.org/show_bug.cgi?id=103085

Reviewed by Sam Weinig.

Merged HTMLCollectionCacheBase into HTMLCollection now that DynamicNodeList and HTMLCollection
share one implementation.

* dom/DynamicNodeList.cpp:
(WebCore::DynamicNodeListCacheBase::rootNode): Merged ownerNodeHasItemRefAttribute since this was
the only caller of this function, and the function name didn't match what it was checking.
(WebCore::DynamicNodeListCacheBase::invalidateCache):
(WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
* dom/DynamicNodeList.h:
(WebCore):
(WebCore::DynamicNodeListCacheBase::cachedItemOffset):
(DynamicNodeListCacheBase):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::DynamicNodeListCacheBase::setItemCache):
(WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Merged cachedElementsArrayOffset()
now that this is the only caller.
(WebCore::HTMLCollection::append):
* html/HTMLCollection.h:
(HTMLCollection):
(WebCore::HTMLCollection::idCache): Moved from HTMLCollectionCacheBase.
(WebCore::HTMLCollection::nameCache): Ditto.
(WebCore::HTMLCollection::appendIdCache): Ditto.
(WebCore::HTMLCollection::appendNameCache): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/DynamicNodeList.cpp
Source/WebCore/dom/DynamicNodeList.h
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLCollection.h