JavaScriptCore:
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2008 04:36:31 +0000 (04:36 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2008 04:36:31 +0000 (04:36 +0000)
commit6e44e8a1e4e027afca257119951d78feb9bd3543
tree53ca481f5f2b451aba8f5bc58983487ddf39383b
parent1125588d42d969b2e78d19fa7226557fed40181a
JavaScriptCore:

        Reviewed by Anders Carlsson.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
        NodeList (and other DOM lists) items are not enumeratable using for..in

        * JavaScriptCore.exp:

WebCore:

        Reviewed by Anders Carlsson.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
        NodeList (and other DOM lists) items are not enumeratable using for..in

        - Match Firefox when enumerating DOM interfaces with indexGetters (support for
          the array bracket, nodeList[0], notation) by including all the items in the
          list before the attributes and methods of the interface.

        Test: fast/dom/domListEnumeration.html

        * ForwardingHeaders/kjs/PropertyNameArray.h: Added.
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model.
        * bindings/js/JSHistoryCustom.cpp:
        (WebCore::JSHistory::customGetPropertyNames): ditto.
        * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of
        getProperyNames and implementing the method in the Custom.cpp, move to a the
        model used by generated getOwnPropertySlot() and put() where the custom code
        is written in a separate customGetPropertyNames which returns a bool indicating
        whether to call up to the base class.  This enables adding the list indexes
        to the PropertyNameArray for interfaces with indexGetters automatically.

LayoutTests:

        Reviewed by Anders Carlsson.

        Test for http://bugs.webkit.org/show_bug.cgi?id=8080
        NodeList (and other DOM lists) items are not enumeratable using for..in

        * fast/dom/domListEnumeration-expected.txt: Added.
        * fast/dom/domListEnumeration.html: Added.
        * fast/dom/resources/domListEnumeration.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
LayoutTests/ChangeLog
LayoutTests/fast/dom/domListEnumeration-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/domListEnumeration.html [new file with mode: 0644]
LayoutTests/fast/dom/resources/domListEnumeration.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/ForwardingHeaders/kjs/PropertyNameArray.h [new file with mode: 0644]
WebCore/bindings/js/JSDOMWindowCustom.cpp
WebCore/bindings/js/JSHistoryCustom.cpp
WebCore/bindings/scripts/CodeGeneratorJS.pm