[Webkit-unassigned] [Bug 78909] getElement* should return HTMLCollection

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 20 15:16:45 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78909





--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2012-02-20 15:16:44 PST ---
(In reply to comment #1)
> Would it make sense to have HTMLCollection use dynamic node lists and fold the getElement* stuff into the CollectionType management?

Sure.

> I haven't looked in too much detail, but it seems the caching of the nodelists could be moved out of the node into the htmlcollection, leaving the node just having to deal with a few collections.

No, that'll result in some perf. regression. HTMLCollection currently checks DOMVersion to invalidate the cache in length() but this results in bugs like https://bugs.webkit.org/show_bug.cgi?id=76003.

Instead, we'll need to re-use nodelist's infrastructure to invalidate node lists at node removal / insertion.

> It looks like a big change though, i guess a first step might be to have HTMLCollection return a dynamic node list for named items, which would be a requirement for this bug anyway (and would fix a bunch of other places that are returning static node lists currently, like bug 9508, which is how i eventually found my way here in the first place :P).

I don't really get what you mean by this. HTMLCollection can't be a DynamicNodeList sine DynamicNodeList is a NodeList: http://www.w3.org/TR/html5/common-dom-interfaces.html#htmlcollection-0

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list