Merge CollectionCache into HTMLCollection.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jan 2012 00:37:59 +0000 (00:37 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jan 2012 00:37:59 +0000 (00:37 +0000)
commit38a26045ca9229a28bd43f92b125167e3e91a2a9
treef32c96da2844036d55fdc5b781a5b9ada2347ed0
parent45d57395165088c869647eac3b8ea83a23c78aaa
Merge CollectionCache into HTMLCollection.
<http://webkit.org/b/75423>

Reviewed by Anders Carlsson.

- Move the members of CollectionCache into HTMLCollection.
- Renamed resetCollectionInfo() to invalidateCacheIfNeeded().
- Removed a bunch of overkill HashMap::checkConsistency() calls.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* html/CollectionCache.cpp: Removed.
* html/CollectionCache.h: Removed.

    Remove CollectionCache.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::append):
* html/HTMLCollection.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::nextItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):

    HTMLCollection's m_info and info() become "struct m_cache" (protected.)

* html/HTMLOptionsCollection.cpp:
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setRecalcListItems):

    Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from
    HTMLSelectElement::setRecalcListItems().

* html/HTMLFormCollection.h:

    Remove stale declaration of formCollectionInfo() which no longer exists.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/CollectionCache.cpp [deleted file]
Source/WebCore/html/CollectionCache.h [deleted file]
Source/WebCore/html/HTMLAllCollection.cpp
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLCollection.h
Source/WebCore/html/HTMLFormCollection.cpp
Source/WebCore/html/HTMLFormCollection.h
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/HTMLOptionsCollection.h
Source/WebCore/html/HTMLSelectElement.cpp