12012-07-12 Ryosuke Niwa <rniwa@webkit.org>
2
3 Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
4 https://bugs.webkit.org/show_bug.cgi?id=91164
5
6 Reviewed by NOBODY (OOPS!).
7
8 Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
9
10 Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
11 all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
12 should include descendents that are not direct children of base().
13
14 In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
15
16 * dom/DynamicNodeList.h:
17 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
18 (DynamicNodeListCacheBase):
19 (WebCore::DynamicNodeListCacheBase::type):
20 (WebCore::DynamicNodeListCacheBase::hasNameCache):
21 (WebCore::DynamicNodeListCacheBase::setHasNameCache):
22 (WebCore::DynamicNodeListCacheBase::clearCache):
23 * html/HTMLCollection.cpp:
24 (WebCore::shouldOnlyIncludeDirectChildren):
25 (WebCore::HTMLCollection::HTMLCollection):
26 (WebCore::HTMLCollection::isAcceptableElement):
27 (WebCore::nextNode):
28 (WebCore::HTMLCollection::itemAfter):
29 * html/HTMLCollection.h:
30 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
31 (HTMLCollectionCacheBase):
32 (WebCore::HTMLCollectionCacheBase::clearCache):
33