Changeset 82997 in webkit


Ignore:
Timestamp:
Apr 5, 2011 4:03:33 PM (13 years ago)
Author:
andersca@apple.com
Message:

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):
Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r82982 r82997  
     12011-04-05  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Some plug-in content is displayed upside down in Unity plug-in
     6        https://bugs.webkit.org/show_bug.cgi?id=57895
     7        <rdar://problem/9212003>
     8
     9        Create the flipped geometry layer in the web process instead of the plug-in process,
     10        which matches what we do in WebKit1.
     11
     12        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
     13        (WebKit::NetscapePlugin::platformPostInitialize):
     14        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
     15        (WebKit::PluginProxy::pluginLayer):
     16
    1172011-04-05  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm

    r82896 r82997  
    233233        if (NPP_GetValue(NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) {
    234234            ASSERT(!m_pluginLayer);
    235 
    236             CALayer *realPluginLayer = reinterpret_cast<CALayer *>(value);
    237 
    238             // Create a layer with flipped geometry and add the real plug-in layer as a sublayer
    239             // so the coordinate system will match the event coordinate system.
    240             m_pluginLayer.adoptNS([[CALayer alloc] init]);
    241             [m_pluginLayer.get() setBounds:[realPluginLayer bounds]];
    242             [m_pluginLayer.get() setGeometryFlipped:YES];
    243 
    244             [realPluginLayer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
    245             [m_pluginLayer.get() addSublayer:realPluginLayer];
     235            m_pluginLayer = reinterpret_cast<CALayer *>(value);
    246236        }
    247237    }
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm

    r76991 r82997  
    3535PlatformLayer* PluginProxy::pluginLayer()
    3636{
    37     if (!m_pluginLayer && m_remoteLayerClientID)
    38         m_pluginLayer = WKMakeRenderLayer(m_remoteLayerClientID);
     37    if (!m_pluginLayer && m_remoteLayerClientID) {
     38        CALayer *renderLayer = WKMakeRenderLayer(m_remoteLayerClientID);
     39
     40        // Create a layer with flipped geometry and add the real plug-in layer as a sublayer
     41        // so the coordinate system will match the event coordinate system.
     42        m_pluginLayer.adoptNS([[CALayer alloc] init]);
     43        [m_pluginLayer.get() setGeometryFlipped:YES];
     44       
     45        [renderLayer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
     46        [m_pluginLayer.get() addSublayer:renderLayer];
     47    }
    3948
    4049    return m_pluginLayer.get();
Note: See TracChangeset for help on using the changeset viewer.