JavaScriptCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Mar 2006 06:28:07 +0000 (06:28 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Mar 2006 06:28:07 +0000 (06:28 +0000)
commit2d24ed5912b6e3497e62c8ebeba5d440af3ed113
treeafce84b3cf79a45a15a4ba759e06b6290c123ccc
parent6c6d1b0ed40b5f2d1809b19e79a1fade49db96d8
JavaScriptCore:

        Reviewed by Maciej.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7726
          REGRESSION: orbitz calendar fails (JavaScript function serialization/parsing)

        * kjs/object.h: Take function name, as well as source URL and line number, when
        using the special overloaded construct for making functions.
        * kjs/object.cpp: (KJS::JSObject::construct): Ditto.
        * kjs/function_object.h: Ditto.
        * kjs/function_object.cpp: (FunctionObjectImp::construct): Pass a name when
        constructing the function rather than null. Use "anonymous" when making a
        function using the default function constructor.

        * kjs/nodes2string.cpp: (FuncDeclNode::streamTo): Put a line break just before
        a function declaration.

        - unrelated fix

        * kxmlcore/HashMapPtrSpec.h: Add missing needed friend declaration.

LayoutTests:

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7726
          REGRESSION: orbitz calendar fails (JavaScript function serialization/parsing)

        * fast/js/resources/function-names.js: Added.
        * fast/js/function-names.html: Generated.
        * fast/js/function-names-expected.txt: Generated.

WebCore:

        Reviewed by Maciej.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7726
          REGRESSION: orbitz calendar fails (JavaScript function serialization/parsing)

        Test: fast/js/function-names.html

        * dom/Document.h: Add function name parameter to createHTMLEventListener.
        * dom/Document.cpp:
        (WebCore::Document::createHTMLEventListener): Pass function name when calling
        createHTMLEventHandler.
        (WebCore::Document::setHTMLWindowEventListener): Pass attribute name as function name
        when calling createHTMLEventListener.

        * html/HTMLElement.cpp: (WebCore::HTMLElement::setHTMLEventListener): Pass attribute
        name as function name when calling createHTMLEventListener.

        * khtml/ecma/kjs_events.h: Add a function name parameter to JSLazyEventListener.
        * khtml/ecma/kjs_events.cpp:
        (KJS::JSLazyEventListener::JSLazyEventListener): Take and store a function name.
        (KJS::JSLazyEventListener::parseCode): Pass function name when constructing the function.

        * khtml/ecma/kjs_proxy.h: Add a function name parameter to createHTMLEventHandler and
        createSVGEventHandler.
        * khtml/ecma/kjs_proxy.cpp:
        (WebCore::KJSProxy::createHTMLEventHandler): Pass function name when creating
        a JSLazyEventListener.
        (WebCore::KJSProxy::createSVGEventHandler): Ditto.

        * ksvg2/events/JSSVGLazyEventListener.h: Add a function name parameter to
        JSSVGLazyEventListener.
        * ksvg2/events/JSSVGLazyEventListener.cpp:
        (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener): Pass the function name
        on to the base class constructor.

        * ksvg2/misc/SVGDocumentExtensions.h: Add function name parameter to createSVGEventListener.
        * ksvg2/misc/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::createSVGEventListener): Pass function name when
        calling createSVGEventHandler.

        * ksvg2/svg/SVGElement.cpp: (WebCore::SVGElement::addSVGEventListener):
        * ksvg2/svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::addSVGWindowEventListner):
        Pass attribute name as function name when calling createSVGEventListener.

        * WebCore.xcodeproj/project.pbxproj: Moved generation script to the top.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/function_object.cpp
JavaScriptCore/kjs/function_object.h
JavaScriptCore/kjs/nodes2string.cpp
JavaScriptCore/kjs/object.cpp
JavaScriptCore/kjs/object.h
JavaScriptCore/kxmlcore/HashMapPtrSpec.h
LayoutTests/ChangeLog
LayoutTests/fast/js/function-names-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/function-names.html [new file with mode: 0644]
LayoutTests/fast/js/resources/function-names.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/html/HTMLElement.cpp
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_events.h
WebCore/khtml/ecma/kjs_proxy.cpp
WebCore/khtml/ecma/kjs_proxy.h
WebCore/ksvg2/events/JSSVGLazyEventListener.cpp
WebCore/ksvg2/events/JSSVGLazyEventListener.h
WebCore/ksvg2/misc/SVGDocumentExtensions.cpp
WebCore/ksvg2/misc/SVGDocumentExtensions.h
WebCore/ksvg2/svg/SVGElement.cpp
WebCore/ksvg2/svg/SVGSVGElement.cpp