Skip to content
  • andersca@apple.com's avatar
    Add support for calling NPObject methods · 5b2497cf
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=43145
    
    Reviewed by Sam Weinig.
    
    WebCore:
    
    * WebCore.exp.in:
    Export JSHTMLElement::s_info and pluginScriptObject.
    
    * WebCore.xcodeproj/project.pbxproj:
    Make JSHTMLElement.h and JSPluginElementFunctions.h private headers.
    
    * bindings/js/JSPluginElementFunctions.cpp:
    (WebCore::pluginScriptObject):
    * bindings/js/JSPluginElementFunctions.h:
    Make pluginScriptObject a public function.
    
    WebKit2:
    
    * WebKit2.xcodeproj/project.pbxproj:
    Add JSNPMethod.cpp and JSNPMethod.h
    
    * WebProcess/Plugins/JSNPMethod.cpp: Added.
    * WebProcess/Plugins/JSNPMethod.h: Added.
    * WebProcess/Plugins/JSNPObject.cpp:
    (WebKit::):
    Add a ClassInfo static variable for JSNPObject.
    
    (WebKit::JSNPObject::callMethod):
    Convert the passed in arguments, call the method and convert the result back.
    
    (WebKit::JSNPObject::getOwnPropertySlot):
    Check if the NPObject has a method.
    
    (WebKit::JSNPObject::methodGetter):
    Return a new JSNPMethod.
    
    * WebProcess/Plugins/JSNPObject.h:
    (WebKit::JSNPObject::classInfo):
    Return the s_info.
    
    * WebProcess/Plugins/NPJSObject.cpp:
    (WebKit::NPJSObject::getProperty):
    Get the property from the JSObject.
    
    * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
    (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
    Convert the given JSValue to an NPVariant.
    
    * win/WebKit2.vcproj:
    Add JSNPMethod.cpp and JSNPMethod.h
    
    LayoutTests:
    
    * platform/mac-wk2/Skipped:
    Remove plugins/npruntime/get-int-identifier-special-values.html since it passes now.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5b2497cf