Commit 5aedc91a authored by andersca@apple.com's avatar andersca@apple.com

2011-04-05 Anders Carlsson <andersca@apple.com>

        Reviewed by Alexey Proskuryakov.

        Some plug-in content is displayed upside down in Unity plug-in
        https://bugs.webkit.org/show_bug.cgi?id=57895
        <rdar://problem/9212003>

        Create the flipped geometry layer in the web process instead of the plug-in process,
        which matches what we do in WebKit1.

        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        (WebKit::NetscapePlugin::platformPostInitialize):
        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
        (WebKit::PluginProxy::pluginLayer):


git-svn-id: svn://svn.chromium.org/blink/trunk@82997 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 75e35dde
2011-04-05 Anders Carlsson <andersca@apple.com>
Reviewed by Alexey Proskuryakov.
Some plug-in content is displayed upside down in Unity plug-in
https://bugs.webkit.org/show_bug.cgi?id=57895
<rdar://problem/9212003>
Create the flipped geometry layer in the web process instead of the plug-in process,
which matches what we do in WebKit1.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::platformPostInitialize):
* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::PluginProxy::pluginLayer):
2011-04-05 Anders Carlsson <andersca@apple.com> 2011-04-05 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler. Reviewed by Darin Adler.
......
...@@ -232,17 +232,7 @@ bool NetscapePlugin::platformPostInitialize() ...@@ -232,17 +232,7 @@ bool NetscapePlugin::platformPostInitialize()
// Get the Core Animation layer. // Get the Core Animation layer.
if (NPP_GetValue(NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) { if (NPP_GetValue(NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) {
ASSERT(!m_pluginLayer); ASSERT(!m_pluginLayer);
m_pluginLayer = reinterpret_cast<CALayer *>(value);
CALayer *realPluginLayer = reinterpret_cast<CALayer *>(value);
// Create a layer with flipped geometry and add the real plug-in layer as a sublayer
// so the coordinate system will match the event coordinate system.
m_pluginLayer.adoptNS([[CALayer alloc] init]);
[m_pluginLayer.get() setBounds:[realPluginLayer bounds]];
[m_pluginLayer.get() setGeometryFlipped:YES];
[realPluginLayer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
[m_pluginLayer.get() addSublayer:realPluginLayer];
} }
} }
......
...@@ -34,8 +34,17 @@ namespace WebKit { ...@@ -34,8 +34,17 @@ namespace WebKit {
PlatformLayer* PluginProxy::pluginLayer() PlatformLayer* PluginProxy::pluginLayer()
{ {
if (!m_pluginLayer && m_remoteLayerClientID) if (!m_pluginLayer && m_remoteLayerClientID) {
m_pluginLayer = WKMakeRenderLayer(m_remoteLayerClientID); CALayer *renderLayer = WKMakeRenderLayer(m_remoteLayerClientID);
// Create a layer with flipped geometry and add the real plug-in layer as a sublayer
// so the coordinate system will match the event coordinate system.
m_pluginLayer.adoptNS([[CALayer alloc] init]);
[m_pluginLayer.get() setGeometryFlipped:YES];
[renderLayer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
[m_pluginLayer.get() addSublayer:renderLayer];
}
return m_pluginLayer.get(); return m_pluginLayer.get();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment