diff options
author | Steve Block <steveblock@google.com> | 2011-05-25 19:08:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 13:51:31 +0100 |
commit | 2bde8e466a4451c7319e3a072d118917957d6554 (patch) | |
tree | 28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm | |
parent | 6939c99b71d9372d14a0c74a772108052e8c48c8 (diff) | |
download | external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2 |
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm b/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm index 2a33008..14ac070 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm @@ -221,7 +221,8 @@ bool NetscapePlugin::platformPostInitialize() #ifndef NP_NO_QUICKDRAW // Right now we don't support the QuickDraw drawing model at all - if (m_drawingModel == NPDrawingModelQuickDraw) + if (m_drawingModel == NPDrawingModelQuickDraw && + !m_pluginModule->pluginQuirks().contains(PluginQuirks::AllowHalfBakedQuickDrawSupport)) return false; #endif @@ -230,7 +231,17 @@ bool NetscapePlugin::platformPostInitialize() // Get the Core Animation layer. if (NPP_GetValue(NPPVpluginCoreAnimationLayer, &value) == NPERR_NO_ERROR && value) { 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]; } } @@ -277,6 +288,10 @@ void NetscapePlugin::platformDestroy() bool NetscapePlugin::platformInvalidate(const IntRect&) { + // NPN_InvalidateRect is just a no-op in the Core Animation drawing model. + if (m_drawingModel == NPDrawingModelCoreAnimation) + return true; + return false; } |