Skip to content
  • ggaren's avatar
    JavaScriptCore: · 77d8fc4c
    ggaren authored
            Reviewed by Maciej.
    
            - JSC support for the fix for <rdar://problem/4467143> JavaScript 
            enumeration of HTML element properties skips DOM node properties
    
            * kjs/lookup.h: 
            (1) Added the KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE macro. The 
            class definiton macro needs to know about the prototype's prototype so 
            that the class constructor properly sets it. 
            (2) Removed the KJS_IMPLEMENT_PROTOTYPE_WITH_PARENT macro. The class
            implementation macro does not need to know about the prototype's
            prototype, since getOwnPropertySlot should only look in the current 
            object's property map, and not its prototype's.
    
    LayoutTests:
    
            Reviewed by Maciej.
    
            - Layout test for <rdar://problem/4467143> JavaScript enumeration of 
            HTML element properties skips DOM node properties
    
            * fast/dom/prototype-chain-expected.txt: Added.
            * fast/dom/prototype-chain.html: Added.
    
    WebCore:
    
            Reviewed by Maciej.
    
            - Second cut at fixing <rdar://problem/4467143> JavaScript enumeration 
            of HTML element properties skips DOM node properties
     
            The approach here is for prototypes, in their constructor methods, 
            to set their own prototypes, preserving the prototype 
            chain in cases of multiple levels of inheritance. (Previously, our
            code assumed that a prototype never had a prototype of its own,
            and always used an empty object as a prototype's prototype).
    
            * bindings/scripts/CodeGeneratorJS.pm: Use the new
            DEFINE_PROTOTYPE_WITH_PROTOTYPE macro in place of the  
            KJS_IMPLEMENT_PROTOTYPE_WITH_PARENT macro.
            * khtml/ecma/kjs_dom.cpp: Ditto.
            * khtml/ecma/kjs_dom.h: Ditto.
            * khtml/ecma/kjs_events.cpp: Ditto.
    
            Touched these files to force a rebuild:
    
            * bindings/js/JSDOMCore.cpp:
            * bindings/js/JSDOMEvents.cpp:
            * dom/Attr.idl:
            * dom/CharacterData.idl:
            * dom/DOMImplementation.idl:
            * dom/DocumentType.idl:
            * dom/Element.idl:
            * dom/Entity.idl:
            * dom/MutationEvent.idl:
            * dom/Notation.idl:
            * dom/ProcessingInstruction.idl:
            * dom/Text.idl:
            * dom/WheelEvent.idl:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    77d8fc4c