WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 11:38:55 +0000 (11:38 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 11:38:55 +0000 (11:38 +0000)
commit0521285592134267937c6fe39bf0461398fdce30
treefd2b6048ce542f71a5aea3426128ca58e22f5e9b
parent4a7342b7e41795941aea78352f7e30cd5dd5a12e
WebCore:

2006-05-11  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=7838
        Add support for mozilla-style node constructors as properties of the window object

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        Add new generated files.

        * bindings/js/JSCanvasRenderingContext2DBase.cpp:
        (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        (WebCore::createJSWrapper):
        Specify the KJS namespace for JSHTMLElmement.

        * bindings/js/kjs_dom.cpp:
        (KJS::toJS):
        Create a WebCore::JSHTMLDocument for document nodes. Also, create
        JSDocumentFragments for document fragments (instead of plain node objects).

        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLDocumentProtoFunc::callAsFunction):
        (KJS::JSHTMLDocument::JSHTMLDocument):
        (KJS::JSHTMLDocument::getOwnPropertySlot):
        Add a prototype for JSHTMLDocument and move all functions there.

        (KJS::JSHTMLElement::JSHTMLElement):
        (KJS::JSHTMLElement::getOwnPropertySlot):
        Update since JSHTMLElement now inherits from WebCore::JSHTMLElement.

        (KJS::JSHTMLElement::getValueProperty):
        (KJS::JSHTMLElement::putValueProperty):
        Remove title setter and getter. Those are autogenerated now.

        * bindings/js/kjs_html.h:
        (KJS::JSHTMLElement::):
        Inherit from WebCore::JSHTMLElement. Clarify the inheritance chain.

        * bindings/scripts/CodeGeneratorJS.pm:
        Always generate a prototype object, regardless of whether the object has any functions or
        constants.

        Use the type of generator attributes to determine what constructor to use. This is useful for
        the XMLDocument property in DOMWindow.idl, since that's just an alias for the Document constructor.

        * dom/DocumentFragment.idl: Added.
        * html/HTMLDocument.idl: Added.
        * html/HTMLElement.idl: Added.

        * page/DOMWindow.idl:
        Add constructors for DocumentFragment, HTMLElement, HTMLDocument and XMLDocument. XMLDocument is just
        an alias for the Document constructor.

LayoutTests:

2006-05-11  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=7838
        Add support for mozilla-style node constructors as properties of the window object

        * fast/dom/prototype-chain-expected.txt:
        Update prototype chains.

        * fast/dom/global-constructors-expected.txt:
        * fast/dom/global-constructors.html:
        Test new constructor objects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/global-constructors-expected.txt
LayoutTests/fast/dom/global-constructors.html
LayoutTests/fast/dom/prototype-chain-expected.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSCanvasRenderingContext2DBase.cpp
WebCore/bindings/js/JSHTMLElementWrapperFactory.cpp
WebCore/bindings/js/kjs_dom.cpp
WebCore/bindings/js/kjs_html.cpp
WebCore/bindings/js/kjs_html.h
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/dom/DocumentFragment.idl [new file with mode: 0644]
WebCore/html/HTMLDocument.idl [new file with mode: 0644]
WebCore/html/HTMLElement.idl [new file with mode: 0644]
WebCore/page/DOMWindow.idl