Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (154049 => 154050)
--- trunk/Source/WebKit/mac/ChangeLog 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-08-14 16:19:21 UTC (rev 154050)
@@ -1,3 +1,21 @@
+2013-08-14 Jer Noble <[email protected]>
+
+ Revert r154019; causes >50 tests to fail on WebKit1 bots.
+
+ * Plugins/Hosted/NetscapePluginHostManager.h:
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::instantiatePlugin):
+ * Plugins/Hosted/NetscapePluginHostProxy.mm:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.h:
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ * Plugins/Hosted/WebHostedNetscapePluginView.h:
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
+ (-[WebHostedNetscapePluginView createPlugin]):
+ (-[WebHostedNetscapePluginView updateAndSetWindow]):
+ * Plugins/Hosted/WebKitPluginClient.defs:
+ * Plugins/Hosted/WebKitPluginHost.defs:
+
2013-08-13 Filip Pizlo <[email protected]>
Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.h 2013-08-14 16:19:21 UTC (rev 154050)
@@ -44,14 +44,14 @@
public:
static NetscapePluginHostManager& shared();
- PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled, bool hostLayersInWindowServer);
+ PassRefPtr<NetscapePluginInstanceProxy> instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled);
void pluginHostDied(NetscapePluginHostProxy*);
void createPropertyListFile(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier);
void didCreateWindow();
-
+
private:
NetscapePluginHostProxy* hostForPlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier);
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2013-08-14 16:19:21 UTC (rev 154050)
@@ -218,7 +218,7 @@
}
}
-PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled, bool hostLayersInWindowServer)
+PassRefPtr<NetscapePluginInstanceProxy> NetscapePluginHostManager::instantiatePlugin(const String& pluginPath, cpu_type_t pluginArchitecture, const String& bundleIdentifier, WebHostedNetscapePluginView *pluginView, NSString *mimeType, NSArray *attributeKeys, NSArray *attributeValues, NSString *userAgent, NSURL *sourceURL, bool fullFrame, bool isPrivateBrowsingEnabled, bool isAcceleratedCompositingEnabled)
{
NetscapePluginHostProxy* hostProxy = hostForPlugin(pluginPath, pluginArchitecture, bundleIdentifier);
if (!hostProxy)
@@ -244,7 +244,6 @@
[properties.get() setObject:[NSNumber numberWithBool:fullFrame] forKey:@"fullFrame"];
[properties.get() setObject:[NSNumber numberWithBool:isPrivateBrowsingEnabled] forKey:@"privateBrowsingEnabled"];
[properties.get() setObject:[NSNumber numberWithBool:isAcceleratedCompositingEnabled] forKey:@"acceleratedCompositingEnabled"];
- [properties.get() setObject:[NSNumber numberWithBool:hostLayersInWindowServer] forKey:@"hostLayersInWindowServer"];
NSData *data = "" dataFromPropertyList:properties.get() format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
ASSERT(data);
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm 2013-08-14 16:19:21 UTC (rev 154050)
@@ -1097,20 +1097,6 @@
return KERN_SUCCESS;
}
-kern_return_t WKPCLayerHostingModeChanged(mach_port_t clientPort, uint32_t pluginID, boolean_t hostsLayersInWindowServer, uint32_t renderContextID)
-{
- NetscapePluginHostProxy* hostProxy = pluginProxyMap().get(clientPort);
- if (!hostProxy)
- return KERN_FAILURE;
-
- NetscapePluginInstanceProxy* instanceProxy = hostProxy->pluginInstance(pluginID);
- if (!instanceProxy)
- return KERN_FAILURE;
-
- instanceProxy->layerHostingModeChanged(hostsLayersInWindowServer, renderContextID);
- return KERN_SUCCESS;
-}
-
kern_return_t WKPCCheckIfAllowedToLoadURL(mach_port_t clientPort, uint32_t pluginID, data_t urlData, mach_msg_type_number_t urlLength,
data_t targetData, mach_msg_type_number_t targetLength, uint32_t *checkID)
{
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.h 2013-08-14 16:19:21 UTC (rev 154050)
@@ -91,9 +91,6 @@
void focusChanged(bool hasFocus);
void windowFocusChanged(bool hasFocus);
void windowFrameChanged(NSRect frame);
-
- void setShouldHostLayersInWindowServer(bool);
- void layerHostingModeChanged(bool hostsLayersInWindowServer, uint32_t renderContextID);
void mouseEvent(NSView *pluginView, NSEvent *, NPCocoaEventType);
void keyEvent(NSView *pluginView, NSEvent *, NPCocoaEventType);
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm 2013-08-14 16:19:21 UTC (rev 154050)
@@ -277,19 +277,6 @@
waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);
}
-
-void NetscapePluginInstanceProxy::setShouldHostLayersInWindowServer(bool shouldHostLayersInWindowServer)
-{
- _WKPHPluginShouldHostLayersInWindowServerChanged(m_pluginHostProxy->port(), m_pluginID, shouldHostLayersInWindowServer);
-}
-
-void NetscapePluginInstanceProxy::layerHostingModeChanged(bool hostsLayersInWindowServer, uint32_t renderContextID)
-{
- setRenderContextID(renderContextID);
-
- [m_pluginView setHostsLayersInWindowServer:hostsLayersInWindowServer];
-}
-
void NetscapePluginInstanceProxy::stopAllStreams()
{
Vector<RefPtr<HostedNetscapePluginStream> > streamsCopy;
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.h 2013-08-14 16:19:21 UTC (rev 154050)
@@ -41,7 +41,6 @@
RetainPtr<NSArray> _attributeValues;
RetainPtr<CALayer> _pluginLayer;
- BOOL _hostsLayersInWindowServer;
WKSoftwareCARendererRef _softwareRenderer;
NSSize _previousSize;
@@ -62,7 +61,6 @@
- (CALayer *)pluginLayer;
- (BOOL)getFormValue:(NSString **)value;
- (void)webFrame:(WebFrame *)webFrame didFinishLoadWithReason:(NPReason)reason;
-- (void)setHostsLayersInWindowServer:(bool)hostsLayersInWindowServer;
@end
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2013-08-14 16:19:21 UTC (rev 154050)
@@ -60,12 +60,6 @@
#include "WebKitPluginHost.h"
}
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-@interface NSWindow (Details)
-- (BOOL)_hostsLayersInWindowServer;
-@end
-#endif
-
@implementation WebHostedNetscapePluginView
+ (void)initialize
@@ -107,37 +101,48 @@
_attributeKeys = adoptNS([keys copy]);
_attributeValues = adoptNS([values copy]);
-}
+}
-- (BOOL)windowHostsLayersInWindowServer
-{
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- return [[[self webView] window] _hostsLayersInWindowServer];
-#else
- return false;
-#endif
-}
-
- (BOOL)createPlugin
{
ASSERT(!_proxy);
NSString *userAgent = [[self webView] userAgentForURL:_baseURL.get()];
- BOOL acceleratedCompositingEnabled = false;
+ BOOL accleratedCompositingEnabled = false;
#if USE(ACCELERATED_COMPOSITING)
- acceleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
+ accleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
#endif
- _hostsLayersInWindowServer = [self windowHostsLayersInWindowServer];
-
- _proxy = NetscapePluginHostManager::shared().instantiatePlugin([_pluginPackage.get() path], [_pluginPackage.get() pluginHostArchitecture], [_pluginPackage.get() bundleIdentifier], self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
- _mode == NP_FULL, _isPrivateBrowsingEnabled, acceleratedCompositingEnabled, _hostsLayersInWindowServer);
+
+ _proxy = NetscapePluginHostManager::shared().instantiatePlugin([_pluginPackage.get() path], [_pluginPackage.get() pluginHostArchitecture], [_pluginPackage.get() bundleIdentifier], self, _MIMEType.get(), _attributeKeys.get(), _attributeValues.get(), userAgent, _sourceURL.get(),
+ _mode == NP_FULL, _isPrivateBrowsingEnabled, accleratedCompositingEnabled);
if (!_proxy)
return NO;
if (_proxy->rendererType() == UseSoftwareRenderer)
_softwareRenderer = WKSoftwareCARendererCreate(_proxy->renderContextID());
- else
- [self createPluginLayer];
+ else {
+ _pluginLayer = WKMakeRenderLayer(_proxy->renderContextID());
+
+ if (accleratedCompositingEnabled && _proxy->rendererType() == UseAcceleratedCompositing) {
+ // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
+ // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
+ // in order to get the coordinate system right.
+ RetainPtr<CALayer> realPluginLayer = adoptNS(_pluginLayer.leakRef());
+
+ _pluginLayer = adoptNS([[CALayer alloc] init]);
+ _pluginLayer.get().bounds = realPluginLayer.get().bounds;
+ _pluginLayer.get().geometryFlipped = YES;
+
+ realPluginLayer.get().autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
+ [_pluginLayer.get() addSublayer:realPluginLayer.get()];
+
+ // 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
+ self.wantsLayer = YES;
+ }
// Update the window frame.
_proxy->windowFrameChanged([[self window] frame]);
@@ -145,51 +150,6 @@
return YES;
}
-- (void)createPluginLayer
-{
- BOOL acceleratedCompositingEnabled = false;
-#if USE(ACCELERATED_COMPOSITING)
- acceleratedCompositingEnabled = [[[self webView] preferences] acceleratedCompositingEnabled];
-#endif
-
- _pluginLayer = WKMakeRenderLayer(_proxy->renderContextID());
-
- if (acceleratedCompositingEnabled && _proxy->rendererType() == UseAcceleratedCompositing) {
- // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView.
- // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry
- // in order to get the coordinate system right.
- RetainPtr<CALayer> realPluginLayer = adoptNS(_pluginLayer.leakRef());
-
- _pluginLayer = adoptNS([[CALayer alloc] init]);
- _pluginLayer.get().bounds = realPluginLayer.get().bounds;
- _pluginLayer.get().geometryFlipped = YES;
-
- _pluginLayer.get().backgroundColor = CGColorCreateGenericRGB(1, 0, 1, 1);
-
- realPluginLayer.get().autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
- [_pluginLayer.get() addSublayer:realPluginLayer.get()];
-
- // 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
- self.wantsLayer = YES;
-}
-
-- (void)setHostsLayersInWindowServer:(bool)hostsLayersInWindowServer
-{
- if (_proxy->rendererType() == UseSoftwareRenderer)
- return;
-
- RetainPtr<CALayer> currentSuperlayer = [_pluginLayer superlayer];
-
- _hostsLayersInWindowServer = hostsLayersInWindowServer;
-
- [self createPluginLayer];
- [self setLayer:currentSuperlayer.get()];
-}
-
// FIXME: This method is an ideal candidate to move up to the base class
- (CALayer *)pluginLayer
{
@@ -255,10 +215,6 @@
_previousSize = boundsInWindow.size;
_proxy->resize(boundsInWindow, visibleRectInWindow);
-
- bool shouldHostLayersInWindowServer = [self windowHostsLayersInWindowServer];
- if (_hostsLayersInWindowServer != shouldHostLayersInWindowServer)
- _proxy->setShouldHostLayersInWindowServer(shouldHostLayersInWindowServer);
}
- (void)windowFocusChanged:(BOOL)hasFocus
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginClient.defs 2013-08-14 16:19:21 UTC (rev 154050)
@@ -207,11 +207,6 @@
target :data_t;
out resolvedURL :data_t, dealloc);
-simpleroutine PCLayerHostingModeChanged(clientPort :mach_port_t;
- pluginID :uint32_t;
- hostsLayersInWindowServer :boolean_t;
- renderContextID :uint32_t);
-
// Replies
simpleroutine PCInstantiatePluginReply(clientPort :mach_port_t;
pluginID :uint32_t;
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs (154049 => 154050)
--- trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs 2013-08-14 15:43:19 UTC (rev 154049)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebKitPluginHost.defs 2013-08-14 16:19:21 UTC (rev 154050)
@@ -71,8 +71,6 @@
height :double;
maxScreenY :double);
-simpleroutine PHPluginShouldHostLayersInWindowServerChanged(pluginHostPort :mach_port_t; pluginID :uint32_t; shouldHostLayersInWindowServer :boolean_t);
-
simpleroutine PHPluginInstanceMouseEvent(pluginHostPort :mach_port_t;
pluginID :uint32_t;
timestamp :double;