WebCore:
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Feb 2005 00:58:13 +0000 (00:58 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Feb 2005 00:58:13 +0000 (00:58 +0000)
commitf3988fe13062065d05c1d5db4b3a3bb3ca0f9f06
treee961fd2ef8f7acd3cbc9c361a556d50d1c3a17a7
parent8538808d695f50f7b4a1515e8c12a07c6fb8b53e
WebCore:
Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls

Re-factored how 'native' wrappers for JS objects are created.  The interpreter now
creates these wrappers.  The WebCore subclass of the interpreter now overrides
createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.

        * WebCore.pbproj/project.pbxproj:
        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::createLanguageInstanceForValue):
        * khtml/ecma/kjs_binding.h:
        * kwq/DOMUtility.mm: Added.
        (KJS::ScriptInterpreter::createObjcInstanceForValue):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::getAppletInstanceForView):
        (getInstanceForView):
        (KWQKHTMLPart::getEmbedInstanceForView):
        (KWQKHTMLPart::getObjectInstanceForView):

JavaScriptCore:
Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls

Re-factored how 'native' wrappers for JS objects are created.  The interpreter now
creates these wrappers.  The WebCore subclass of the interpreter now overrides
createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.

        Reviewed by Ken.

        * bindings/c/c_utility.cpp:
        (convertValueToNPVariant):
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):
        (JavaArray::valueAt):
        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject _setExecutionContext:KJS::Bindings::]):
        (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
        * bindings/objc/WebScriptObjectPrivate.h:
        * bindings/objc/objc_utility.h:
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):
        (KJS::Bindings::createObjcInstanceForValue):
        * bindings/runtime.cpp:
        (Instance::createBindingForLanguageInstance):
        (Instance::createRuntimeObject):
        (Instance::createLanguageInstanceForValue):
        * bindings/runtime.h:
        * kjs/interpreter.cpp:
        (Interpreter::createLanguageInstanceForValue):
        * kjs/interpreter.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/bindings/c/c_utility.cpp
JavaScriptCore/bindings/jni/jni_instance.cpp
JavaScriptCore/bindings/jni/jni_runtime.cpp
JavaScriptCore/bindings/objc/WebScriptObject.mm
JavaScriptCore/bindings/objc/WebScriptObjectPrivate.h
JavaScriptCore/bindings/objc/objc_utility.h
JavaScriptCore/bindings/objc/objc_utility.mm
JavaScriptCore/bindings/runtime.cpp
JavaScriptCore/bindings/runtime.h
JavaScriptCore/kjs/interpreter.cpp
JavaScriptCore/kjs/interpreter.h
WebCore/ChangeLog-2005-08-23
WebCore/WebCore.pbproj/project.pbxproj
WebCore/khtml/ecma/kjs_binding.cpp
WebCore/khtml/ecma/kjs_binding.h
WebCore/kwq/DOMUtility.mm [new file with mode: 0644]
WebCore/kwq/KWQKHTMLPart.mm