Make NodeList and HTMLCollection caching helpers use PassRef.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Mar 2014 10:48:32 +0000 (10:48 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 30 Mar 2014 10:48:32 +0000 (10:48 +0000)
commit4dad8935a2e83f8de48863f891e479320299c066
tree6a04ba20407ec06c8d7537206edff20d2d6b9a75
parent8d2a6745e9821c7ee631c35c47ddaaa7e584f595
Make NodeList and HTMLCollection caching helpers use PassRef.
<https://webkit.org/b/130943>

Tweak the helpers in NodeListsNodeData to return PassRef instead of
PassRefPtr. This knocks 2 branches off of some pretty hot code on
Dromaeo/dom-query.

Reviewed by Antti Koivisto.

* dom/ChildNodeList.h:
* dom/ClassNodeList.h:
* dom/NameNodeList.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
(WebCore::NodeListsNodeData::addCachedCollection):
* dom/TagNodeList.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::create):
* html/HTMLCollection.h:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::create):
* html/HTMLFormControlsCollection.h:
* html/RadioNodeList.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ChildNodeList.h
Source/WebCore/dom/ClassNodeList.h
Source/WebCore/dom/NameNodeList.h
Source/WebCore/dom/NodeRareData.h
Source/WebCore/dom/TagNodeList.h
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLCollection.h
Source/WebCore/html/HTMLFormControlsCollection.cpp
Source/WebCore/html/HTMLFormControlsCollection.h
Source/WebCore/html/RadioNodeList.h