summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Plugins/Hosted
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-05-21 16:53:46 +0100
committerKristian Monsen <kristianm@google.com>2010-05-25 10:24:15 +0100
commit6c2af9490927c3c5959b5cb07461b646f8b32f6c (patch)
treef7111b9b22befab472616c1d50ec94eb50f1ec8c /WebKit/mac/Plugins/Hosted
parenta149172322a9067c14e8b474a53e63649aa17cad (diff)
downloadexternal_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.zip
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.gz
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.bz2
Merge WebKit at r59636: Initial merge by git
Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
Diffstat (limited to 'WebKit/mac/Plugins/Hosted')
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm2
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h12
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm2
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm10
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs2
-rw-r--r--WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h6
7 files changed, 24 insertions, 14 deletions
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 281d41f..e4177f5 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -272,7 +272,7 @@ PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePl
}
instance->setRenderContextID(reply->m_renderContextID);
- instance->setUseSoftwareRenderer(reply->m_useSoftwareRenderer);
+ instance->setRendererType(reply->m_rendererType);
return instance.release();
}
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index b437012..1d4cdad 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -499,7 +499,7 @@ kern_return_t WKPCBooleanAndDataReply(mach_port_t clientPort, uint32_t pluginID,
return KERN_SUCCESS;
}
-kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, kern_return_t result, uint32_t renderContextID, boolean_t useSoftwareRenderer)
+kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t pluginID, uint32_t requestID, kern_return_t result, uint32_t renderContextID, uint32_t rendererType)
{
NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
if (!hostProxy)
@@ -509,7 +509,7 @@ kern_return_t WKPCInstantiatePluginReply(mach_port_t clientPort, uint32_t plugin
if (!instanceProxy)
return KERN_FAILURE;
- instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::InstantiatePluginReply(result, renderContextID, useSoftwareRenderer));
+ instanceProxy->setCurrentReply(requestID, new NetscapePluginInstanceProxy::InstantiatePluginReply(result, renderContextID, static_cast<RendererType>(rendererType)));
return KERN_SUCCESS;
}
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
index 593d336..62c0f38 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h
@@ -75,8 +75,8 @@ public:
uint32_t renderContextID() const { ASSERT(fastMallocSize(this)); return m_renderContextID; }
void setRenderContextID(uint32_t renderContextID) { m_renderContextID = renderContextID; }
- bool useSoftwareRenderer() const { return m_useSoftwareRenderer; }
- void setUseSoftwareRenderer(bool useSoftwareRenderer) { m_useSoftwareRenderer = useSoftwareRenderer; }
+ RendererType rendererType() const { return m_rendererType; }
+ void setRendererType(RendererType rendererType) { m_rendererType = rendererType; }
WebHostedNetscapePluginView *pluginView() const { ASSERT(fastMallocSize(this)); return m_pluginView; }
NetscapePluginHostProxy* hostProxy() const { ASSERT(fastMallocSize(this)); return m_pluginHostProxy; }
@@ -197,17 +197,17 @@ public:
struct InstantiatePluginReply : public Reply {
static const int ReplyType = InstantiatePlugin;
- InstantiatePluginReply(kern_return_t resultCode, uint32_t renderContextID, boolean_t useSoftwareRenderer)
+ InstantiatePluginReply(kern_return_t resultCode, uint32_t renderContextID, RendererType rendererType)
: Reply(InstantiatePlugin)
, m_resultCode(resultCode)
, m_renderContextID(renderContextID)
- , m_useSoftwareRenderer(useSoftwareRenderer)
+ , m_rendererType(rendererType)
{
}
kern_return_t m_resultCode;
uint32_t m_renderContextID;
- boolean_t m_useSoftwareRenderer;
+ RendererType m_rendererType;
};
struct GetScriptableNPObjectReply : public Reply {
@@ -300,7 +300,7 @@ private:
uint32_t m_pluginID;
uint32_t m_renderContextID;
- boolean_t m_useSoftwareRenderer;
+ RendererType m_rendererType;
bool m_waitingForReply;
HashMap<uint32_t, Reply*> m_replies;
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index f027534..8b0a2bf 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -216,7 +216,7 @@ NetscapePluginInstanceProxy::NetscapePluginInstanceProxy(NetscapePluginHostProxy
, m_requestTimer(this, &NetscapePluginInstanceProxy::requestTimerFired)
, m_currentURLRequestID(0)
, m_renderContextID(0)
- , m_useSoftwareRenderer(false)
+ , m_rendererType(UseSoftwareRenderer)
, m_waitingForReply(false)
, m_urlCheckCounter(0)
, m_pluginFunctionCallDepth(0)
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 9da1b53..519e274 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -40,6 +40,7 @@
#import <WebCore/Bridge.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoaderTypes.h>
+#import <WebCore/FrameView.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/RenderEmbeddedObject.h>
#import <WebCore/WebCoreObjCExtras.h>
@@ -115,14 +116,17 @@ extern "C" {
if (!_proxy)
return NO;
- if (_proxy->useSoftwareRenderer())
+ if (_proxy->rendererType() == UseSoftwareRenderer)
_softwareRenderer = WKSoftwareCARendererCreate(_proxy->renderContextID());
else {
_pluginLayer = WKMakeRenderLayer(_proxy->renderContextID());
- if (accleratedCompositingEnabled)
+ if (accleratedCompositingEnabled && _proxy->rendererType() == UseAcceleratedCompositing) {
+ // Eagerly enter compositing mode, since we know we'll need it. This avoids firing setNeedsStyleRecalc()
+ // for iframes that contain composited plugins at bad times. https://bugs.webkit.org/show_bug.cgi?id=39033
+ core([self webFrame])->view()->enterCompositingMode();
[self element]->setNeedsStyleRecalc(SyntheticStyleChange);
- else
+ } else
self.wantsLayer = YES;
}
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
index 6b1a319..4129ca1 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs
@@ -213,7 +213,7 @@ simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t;
requestID :uint32_t;
result :kern_return_t;
renderContextID :uint32_t;
- useSoftwareRenderer :boolean_t);
+ rendererType :uint32_t);
simpleroutine PCGetScriptableNPObjectReply(clientPort :mach_port_t;
pluginID :uint32_t;
diff --git a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
index e8bd82d..0bac2bc 100644
--- a/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
+++ b/WebKit/mac/Plugins/Hosted/WebKitPluginHostTypes.h
@@ -58,4 +58,10 @@ enum ValueType {
NPObjectValueType
};
+enum RendererType {
+ UseAcceleratedCompositing,
+ UseSoftwareRenderer,
+ UseLayerBackedView
+};
+
#endif // WebKitPluginHostTypes_h