The JSC bindings for HTMLCollection and HTMLAllCollection canGetItemsFormName() currently retrieve the entire list of relevant named just to see if it's empty. We could accomplish the same thing in a more efficient way.
Created attachment 119755 [details] Patch
Comment on attachment 119755 [details] Patch Clearing flags on attachment: 119755 Committed r103190: <http://trac.webkit.org/changeset/103190>
All reviewed patches have been landed. Closing bug.
Comment on attachment 119755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119755&action=review > Source/WebCore/html/HTMLCollection.cpp:339 > + resetCollectionInfo(); The need to call this is a surprise. Why is it needed?
Comment on attachment 119755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=119755&action=review >> Source/WebCore/html/HTMLCollection.cpp:339 >> + resetCollectionInfo(); > > The need to call this is a surprise. Why is it needed? resetCollectionInfo() is poorly named, it doesn't actually reset anything unless the document's DOM tree version has changed. If we don't call this, updateNameCache() may find that m_info->hasNameCache is true, yet the cache is out of sync with the document.
(In reply to comment #5) > resetCollectionInfo() is poorly named OK. Itβs kind of fun for me how we all continually learn together how important names are for future understanding of the code.