Skip to content
  • andersca@apple.com's avatar
    WebCore: · 4348c6a8
    andersca@apple.com authored
    2008-10-24  Anders Carlsson  <andersca@apple.com>
    
            Reviewed by Sam Weinig.
    
            <rdar://problem/5440917> Support NPN_Construct
                    
            * WebCore.NPAPI.exp:
            Export _NPN_Construct.
            
            * bridge/NP_jsobject.cpp:
            (_NPN_Construct):
            Implement this.
            
            * bridge/c/c_instance.cpp:
            (JSC::Bindings::CInstance::supportsConstruct):
            (JSC::Bindings::CInstance::invokeConstruct):
            Have this call the appropriate NPClass method.
            
            * bridge/npruntime.h:
            Add NPN_Construct.
    
            * bridge/npruntime_impl.h:
            Add _NPN_Construct.
            
            * bridge/runtime.h:
            (JSC::Bindings::Instance::supportsConstruct):
            (JSC::Bindings::Instance::invokeConstruct):
            New methods.
            
            * bridge/runtime_object.cpp:
            (JSC::callRuntimeConstructor):
            Call the native instance.
            
            (JSC::RuntimeObjectImp::getConstructData):
            Implement this.
            
            * bridge/runtime_object.h:
            Add new method declarations.
            
            * plugins/gtk/PluginPackageGtk.cpp:
            (WebCore::PluginPackage::load):
            * plugins/qt/PluginPackageQt.cpp:
            (WebCore::PluginPackage::load):
            * plugins/win/PluginPackageWin.cpp:
            (WebCore::PluginPackage::load):
            Initialize m_pluginFuncs.construct.
    
    WebKit/mac:
    
    2008-10-24  Anders Carlsson  <andersca@apple.com>
    
            Reviewed by Sam Weinig.
    
            <rdar://problem/5440917> Support NPN_Construct
            
            Set construct.
            
            * Plugins/WebNetscapePluginPackage.m:
            (-[WebNetscapePluginPackage load]):
    
    WebKitTools:
    
    2008-10-24  Anders Carlsson  <andersca@apple.com>
    
            Reviewed by Sam Weinig.
            
            <rdar://problem/5440917> Support NPN_Construct
            
            * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
            (testCallback):
            Fix a memory leak.
            
            (testConstruct):
            New test method that treats it first argument as a constructor and invokes it with the rest of the arguments.
            
            (pluginInvoke):
            Handle testConstruct.
            
            * DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp:
            (testGetProperty):
            Add objectPointer property.
            
            (testEnumerate):
            Only enumerate the two first properties.
            
            (testConstruct):
            Add a simple construct implementation that just returns the test object.
    
    LayoutTests:
    
    2008-10-24  Anders Carlsson  <andersca@apple.com>
    
            Reviewed by Sam Weinig.
    
            <rdar://problem/5440917> Support NPN_Construct
            
            Add testcase.
            
            * plugins/netscape-construct-expected.txt: Added.
            * plugins/netscape-construct.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4348c6a8