Tighten bitfields in live NodeLists and HTMLCollections
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 17:57:31 +0000 (17:57 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Feb 2014 17:57:31 +0000 (17:57 +0000)
commitb7dc56ad06d737ac0c917e6666452fb1774052e0
tree4dc7aaec0c122cecfa0a79f33db541a5ab21dfaf
parenta0fe03792de8e8948f12451a7a655ceaaedf5b68
Tighten bitfields in live NodeLists and HTMLCollections
https://bugs.webkit.org/show_bug.cgi?id=129300

Reviewed by Geoffrey Garen.

Reduce the number of bits used for m_rootType and m_type in LiveNodeList.
Also use enum class for LiveNodeList types. We keep "Type" suffix not to
confuse old-ish compilers.

* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::collectionFirst):
(WebCore::LiveNodeList::collectionTraverseForward):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* dom/NameNodeList.h:
(WebCore::NameNodeList::create):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::namedNodeListKey):
* dom/TagNodeList.cpp:
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
* dom/TagNodeList.h:
(WebCore::TagNodeList::create):
(WebCore::HTMLTagNodeList::create):
* html/HTMLCollection.h:
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:
(WebCore::RadioNodeList::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ClassNodeList.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/LiveNodeList.cpp
Source/WebCore/dom/LiveNodeList.h
Source/WebCore/dom/NameNodeList.cpp
Source/WebCore/dom/NameNodeList.h
Source/WebCore/dom/NodeRareData.h
Source/WebCore/dom/TagNodeList.cpp
Source/WebCore/dom/TagNodeList.h
Source/WebCore/html/HTMLCollection.h
Source/WebCore/html/LabelableElement.cpp
Source/WebCore/html/LabelsNodeList.cpp
Source/WebCore/html/LabelsNodeList.h
Source/WebCore/html/RadioNodeList.cpp
Source/WebCore/html/RadioNodeList.h