LayoutTests:
Reviewed by Geoff.
Test case for <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
Give Netscape plug-ins access to their own DOM element
* plugins/netscape-dom-access-expected.checksum: Added.
* plugins/netscape-dom-access-expected.png: Added.
* plugins/netscape-dom-access-expected.txt: Added.
* plugins/netscape-dom-access.html: Added.
WebCore:
Reviewed by Anders.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
Give Netscape plug-ins access to their own DOM element
* html/HTMLPlugInElement.h:
Just import JSC headers on Mac. The NPObject and Bindings::Instance stuff is only used on Mac anyway.
Changed __APPLE__ to PLATFORM(MAC).
Added m_NPObject ivar.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
Initialize the NPObject.
(WebCore::HTMLPlugInElement::~HTMLPlugInElement):
Release the NPObject when the element is destroyed.
(WebCore::HTMLPlugInElement::createNPObject):
Creates an NPObject for the element.
(WebCore::HTMLPlugInElement::getNPObject):
Returns the NPObject for the element, creating and caching it if necessary.
* html/HTMLAppletElement.h:
Changed __APPLE__ to PLATFORM(MAC).
* html/HTMLAppletElement.cpp:
ditto
* html/HTMLEmbedElement.h:
ditto
* html/HTMLEmbedElement.cpp:
ditto
* html/HTMLObjectElement.h:
ditto
* html/HTMLObjectElement.cpp:
ditto
* bindings/objc/DOMPrivate.h:
Added -[DOMElement _NPObject].
* bindings/objc/DOM.mm:
(-[DOMElement _NPObject]):
Returns the NPObject for the element. Since this is only needed by the Netscape plug-in API, you can only get
the NPObject for applet, embed, and object elements.
WebKit:
Reviewed by Geoff.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
Give Netscape plug-ins access to their own DOM element
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView dealloc]):
Release DOM element.
(-[WebBaseNetscapePluginView getVariable:value:]):
Return NPObject for plugin DOM element.
* Plugins/WebNetscapePluginEmbeddedView.h:
* Plugins/WebNetscapePluginEmbeddedView.m:
(-[WebNetscapePluginEmbeddedView initWithFrame:plugin:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
Now takes a DOMElement, in much the same way that WebKit plug-in views take a DOMElement.
* WebCoreSupport/WebFrameBridge.m:
(-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
Pass DOMElement to Netscape plug-ins.
(-[WebFrameBridge viewForJavaAppletWithFrame:attributeNames:attributeValues:baseURL:DOMElement:]):
ditto
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed