Title: [229629] trunk/Source/WebKit
- Revision
- 229629
- Author
- [email protected]
- Date
- 2018-03-15 11:30:19 -0700 (Thu, 15 Mar 2018)
Log Message
REGRESSION(r229484): Plugins often require CGS Connections to draw
https://bugs.webkit.org/show_bug.cgi?id=183663
<rdar://problem/38439218>
Reviewed by Per Arne Vollan.
Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
process to have on, create a new plugin process-specific layer host creation method that
gives this access.
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
method.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (229628 => 229629)
--- trunk/Source/WebKit/ChangeLog 2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/ChangeLog 2018-03-15 18:30:19 UTC (rev 229629)
@@ -1,3 +1,22 @@
+2018-03-15 Brent Fulgham <[email protected]>
+
+ REGRESSION(r229484): Plugins often require CGS Connections to draw
+ https://bugs.webkit.org/show_bug.cgi?id=183663
+ <rdar://problem/38439218>
+
+ Reviewed by Per Arne Vollan.
+
+ Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
+ process to have on, create a new plugin process-specific layer host creation method that
+ gives this access.
+
+ * Platform/mac/LayerHostingContext.h:
+ * Platform/mac/LayerHostingContext.mm:
+ (WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.
+ * PluginProcess/mac/PluginControllerProxyMac.mm:
+ (WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
+ method.
+
2018-03-15 Zan Dobersek <[email protected]>
[TexMap] Remove TextureMapperLayer::texture()
Modified: trunk/Source/WebKit/Platform/mac/LayerHostingContext.h (229628 => 229629)
--- trunk/Source/WebKit/Platform/mac/LayerHostingContext.h 2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/Platform/mac/LayerHostingContext.h 2018-03-15 18:30:19 UTC (rev 229629)
@@ -46,7 +46,10 @@
static std::unique_ptr<LayerHostingContext> createForPort(const WebCore::MachSendRight& serverPort);
#if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
static std::unique_ptr<LayerHostingContext> createForExternalHostingProcess();
+#if PLATFORM(MAC)
+ static std::unique_ptr<LayerHostingContext> createForExternalPluginHostingProcess();
#endif
+#endif
LayerHostingContext();
~LayerHostingContext();
Modified: trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm (229628 => 229629)
--- trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm 2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm 2018-03-15 18:30:19 UTC (rev 229629)
@@ -72,7 +72,17 @@
return layerHostingContext;
}
+
+#if PLATFORM(MAC)
+std::unique_ptr<LayerHostingContext> LayerHostingContext::createForExternalPluginHostingProcess()
+{
+ auto layerHostingContext = std::make_unique<LayerHostingContext>();
+ layerHostingContext->m_layerHostingMode = LayerHostingMode::OutOfProcess;
+ layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }];
+ return layerHostingContext;
+}
#endif
+#endif // HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
LayerHostingContext::LayerHostingContext()
{
Modified: trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm (229628 => 229629)
--- trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm 2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm 2018-03-15 18:30:19 UTC (rev 229629)
@@ -130,7 +130,7 @@
break;
#if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
case LayerHostingMode::OutOfProcess:
- m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess();
+ m_layerHostingContext = LayerHostingContext::createForExternalPluginHostingProcess();
break;
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes