Plug-ins using the Core Animation drawing model should work when hosting the layer...
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 00:16:52 +0000 (00:16 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 00:16:52 +0000 (00:16 +0000)
commit586db03c1478b9ebca5a3a28cdb6ad7a1dde2684
tree6414457ea2e2d03303bafa25023a455e34b23806
parent0a32fd717927685e70193bf6f31f64fa418535ca
Plug-ins using the Core Animation drawing model should work when hosting the layer tree in the window server
https://bugs.webkit.org/show_bug.cgi?id=82387
<rdar://problem/11031942>

Reviewed by Sam Weinig.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::initialize):
Remove m_pluginCreationParameters; it was used by the old NPRuntime short-circuit code.
Make platformInitialize take creation parameters.

* PluginProcess/PluginControllerProxy.messages.in:
Add SetLayerHostingMode message.

* PluginProcess/gtk/PluginControllerProxyGtk.cpp:
(WebKit::PluginControllerProxy::platformInitialize):
Make platformInitialize take creation parameters.

* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::platformInitialize):
Call updateLayerHostingContext.

(WebKit::PluginControllerProxy::setLayerHostingMode):
Call updateLayerHostingContext and send back the new context ID.

(WebKit::PluginControllerProxy::updateLayerHostingContext):
Create a new LayerHostingContext given the layer hosting mode.

* PluginProcess/qt/PluginControllerProxyQt.cpp:
(WebKit::PluginControllerProxy::platformInitialize):
Make platformInitialize take creation parameters.

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::setLayerHostingMode):
Add stub.

* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::makeRenderLayer):
Add helper function for creating a new render layer.

(WebKit::PluginProxy::pluginLayer):
Call makeRenderLayer.

(WebKit::PluginProxy::setLayerHostingMode):
Send a message to the plug-in process.

(WebKit::PluginProxy::setLayerHostingContextID):
Update the context ID and make a new render layer.

* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::setLayerHostingMode):
Add stub.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:

* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h:
Add the layer hosting mode as a parameter. Add a new setLayerHostingMode pure virtual member function.

* WebProcess/Plugins/PluginProxy.messages.in:
Add a SetLayerHostingContextID message.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
Call down to the plug-in.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
Set the layer hosting mode of the page.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Initialize m_layerHostingMode to false.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
Add m_layerHostingMode and a getter.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
Call WebPage::setLayerHostingMode.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setLayerHostingMode):
Tell all plug-ins that the layer hosting mode changed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
Source/WebKit2/PluginProcess/PluginControllerProxy.h
Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in
Source/WebKit2/PluginProcess/gtk/PluginControllerProxyGtk.cpp
Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
Source/WebKit2/PluginProcess/qt/PluginControllerProxyQt.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
Source/WebKit2/WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp
Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h
Source/WebKit2/WebProcess/Plugins/Plugin.cpp
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.messages.in
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm