HTMLCollection::updateNamedElementCach iterates over items twice
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2014 19:32:41 +0000 (19:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2014 19:32:41 +0000 (19:32 +0000)
commitd5a562466c49ebbac952c4f11fed4b42ab63b6b4
tree32ff9d16907f5df3fa26918893ba2a3c4f74dea9
parent8e8aeb643c7080605e13e169678207e7d1691f4e
HTMLCollection::updateNamedElementCach iterates over items twice
https://bugs.webkit.org/show_bug.cgi?id=131448

Reviewed by Andreas Kling.

Compute the length first and go through the cache interface to traverse through items.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::updateNamedElementCache):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCollection.cpp