Bug 103364

Summary: HTMLCollection on Document should be stored on NodeListsNodeData like other HTMLCollections and LiveNodeLists
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, cmarcelo, darin, koivisto, mifenton, ojan, sam, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 78909    
Attachments:
Description Flags
Cleanup andersca: review+, rniwa: commit-queue-

Ryosuke Niwa
Reported 2012-11-26 22:08:30 PST
HTMLCollection on Document should use NodeRareData like other HTMLCollection and LiveNodeList
Attachments
Cleanup (36.32 KB, patch)
2012-11-27 01:31 PST, Ryosuke Niwa
andersca: review+
rniwa: commit-queue-
Ryosuke Niwa
Comment 1 2012-11-27 01:31:41 PST
Ryosuke Niwa
Comment 2 2012-11-27 11:27:21 PST
Comment on attachment 176196 [details] Cleanup Oh, oops. This changelog contains the old bug title :(
Ryosuke Niwa
Comment 3 2012-11-27 11:59:24 PST
Darin Adler
Comment 4 2012-11-27 12:14:56 PST
Comment on attachment 176196 [details] Cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=176196&action=review > Source/WebCore/dom/NodeRareData.h:79 > + PassRefPtr<T> addCacheWithAtomicName(Node* node, CollectionType collectionType) Could this have been ContainerNode* across the board instead of Node*?
Ryosuke Niwa
Comment 5 2012-11-27 12:17:36 PST
(In reply to comment #4) > (From update of attachment 176196 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=176196&action=review > > > Source/WebCore/dom/NodeRareData.h:79 > > + PassRefPtr<T> addCacheWithAtomicName(Node* node, CollectionType collectionType) > > Could this have been ContainerNode* across the board instead of Node*? No. Some addCacheWithAtomicName callers are member functions of Node. It is true that all owner nodes are ContainerNode since they’re either Document, Element, or ShadowRoot but we probably need to move all those member functions from Node to ContainerNode in order to change the type. Otherwise, we’ll be doing a lot of const_casts, which isn’t particularly better than the current code IMO.
Note You need to log in before you can comment on or make changes to this bug.