Title: [164112] trunk/Source/WebKit2
Revision
164112
Author
m...@apple.com
Date
2014-02-14 11:38:17 -0800 (Fri, 14 Feb 2014)

Log Message

Stop using PLATFORM(MAC) in WebKit2/PluginProcess except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128802

Reviewed by Darin Adler.

* PluginProcess/PluginControllerProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::paint):
* PluginProcess/PluginControllerProxy.h: Ditto.
* PluginProcess/PluginControllerProxy.messages.in: Ditto.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess): Ditto.
(WebKit::PluginProcess::netscapePluginModule): Added && !PLATFORM(IOS) around Mac-specific
quirk.
(WebKit::PluginProcess::createWebProcessConnection): Changed PLATFORM(MAC) to OS(DARWIN)
around use of Mach-based IPC.
* PluginProcess/PluginProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA), and to
USE(APPKIT) around override of stopRunLoop, which is implemented using AppKit.
* PluginProcess/PluginProcess.messages.in: Removed PLATFORM(MAC) guard around
SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.
* PluginProcess/WebProcessConnection.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::WebProcessConnection::createPluginInternal):
(WebKit::WebProcessConnection::createPlugin):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (164111 => 164112)


--- trunk/Source/WebKit2/ChangeLog	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/ChangeLog	2014-02-14 19:38:17 UTC (rev 164112)
@@ -1,3 +1,29 @@
+2014-02-14  Dan Bernstein  <m...@apple.com>
+
+        Stop using PLATFORM(MAC) in WebKit2/PluginProcess except where it means “OS X but not iOS”
+        https://bugs.webkit.org/show_bug.cgi?id=128802
+
+        Reviewed by Darin Adler.
+
+        * PluginProcess/PluginControllerProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::PluginControllerProxy::PluginControllerProxy):
+        (WebKit::PluginControllerProxy::paint):
+        * PluginProcess/PluginControllerProxy.h: Ditto.
+        * PluginProcess/PluginControllerProxy.messages.in: Ditto.
+        * PluginProcess/PluginProcess.cpp:
+        (WebKit::PluginProcess::PluginProcess): Ditto.
+        (WebKit::PluginProcess::netscapePluginModule): Added && !PLATFORM(IOS) around Mac-specific
+        quirk.
+        (WebKit::PluginProcess::createWebProcessConnection): Changed PLATFORM(MAC) to OS(DARWIN)
+        around use of Mach-based IPC.
+        * PluginProcess/PluginProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA), and to
+        USE(APPKIT) around override of stopRunLoop, which is implemented using AppKit.
+        * PluginProcess/PluginProcess.messages.in: Removed PLATFORM(MAC) guard around
+        SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.
+        * PluginProcess/WebProcessConnection.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::WebProcessConnection::createPluginInternal):
+        (WebKit::WebProcessConnection::createPlugin):
+
 2014-02-14  Anders Carlsson  <ander...@apple.com>
 
         Add -[WKWebView estimatedProgress]

Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp	2014-02-14 19:38:17 UTC (rev 164112)
@@ -46,7 +46,7 @@
 #include <wtf/TemporaryChange.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "LayerHostingContext.h"
 #endif
 
@@ -66,7 +66,7 @@
     , m_pluginDestroyTimer(RunLoop::main(), this, &PluginControllerProxy::destroy)
     , m_waitingForDidUpdate(false)
     , m_pluginCanceledManualStreamLoad(false)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , m_isComplexTextInputEnabled(false)
 #endif
     , m_contentsScaleFactor(creationParameters.contentsScaleFactor)
@@ -178,7 +178,7 @@
     // Create a graphics context.
     auto graphicsContext = m_backingStore->createGraphicsContext();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // FIXME: We should really call applyDeviceScaleFactor instead of scale, but that ends up calling into WKSI
     // which we currently don't have initiated in the plug-in process.
     graphicsContext->scale(FloatSize(m_contentsScaleFactor, m_contentsScaleFactor));

Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h	2014-02-14 19:38:17 UTC (rev 164112)
@@ -66,7 +66,7 @@
 
     bool wantsWheelEvents() const;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     uint32_t remoteLayerClientID() const;
 #endif
 
@@ -98,7 +98,7 @@
     virtual void didInitializePlugin() override;
     virtual void didFailToInitializePlugin() override;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     virtual void pluginFocusOrWindowFocusChanged(bool) override;
     virtual void setComplexTextInputState(PluginComplexTextInputState) override;
     virtual mach_port_t compositingRenderServerPort() override;
@@ -146,7 +146,7 @@
     void didUpdate();
     void getPluginScriptableNPObject(uint64_t& pluginScriptableNPObjectID);
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void windowFocusChanged(bool);
     void windowAndViewFramesChanged(const WebCore::IntRect& windowFrameInScreenCoordinates, const WebCore::IntRect& viewFrameInWindowCoordinates);
     void windowVisibilityChanged(bool);
@@ -199,7 +199,7 @@
     // Whether the plug-in has canceled the manual stream load.
     bool m_pluginCanceledManualStreamLoad;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Whether complex text input is enabled for this plug-in.
     bool m_isComplexTextInputEnabled;
 

Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.messages.in	2014-02-14 19:38:17 UTC (rev 164112)
@@ -95,7 +95,7 @@
     # Get a reference to the plug-in's scriptable NPObject.
     GetPluginScriptableNPObject() -> (uint64_t pluginScriptableNPObjectID)
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     # Send the complex text input to the plug-in.
     SendComplexTextInput(String textInput)
 

Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp	2014-02-14 19:38:17 UTC (rev 164112)
@@ -40,7 +40,7 @@
 #include <WebCore/NotImplemented.h>
 #include <wtf/RunLoop.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 #include <crt_externs.h>
 #endif
 
@@ -57,7 +57,7 @@
 PluginProcess::PluginProcess()
     : m_supportsAsynchronousPluginInitialization(false)
     , m_minimumLifetimeTimer(RunLoop::main(), this, &PluginProcess::minimumLifetimeTimerFired)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , m_compositingRenderServerPort(MACH_PORT_NULL)
 #endif
     , m_connectionActivity("PluginProcess connection activity.")
@@ -106,7 +106,7 @@
         ASSERT(!m_pluginPath.isNull());
         m_pluginModule = NetscapePluginModule::getOrCreate(m_pluginPath);
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
         if (m_pluginModule) {
             if (m_pluginModule->pluginQuirks().contains(PluginQuirks::PrognameShouldBeWebKitPluginHost))
                 *const_cast<const char**>(_NSGetProgname()) = "WebKitPluginHost";
@@ -153,7 +153,7 @@
 {
     bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty();
 
-#if PLATFORM(MAC)
+#if OS(DARWIN)
     // Create the listening port.
     mach_port_t listeningPort;
     mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
@@ -226,7 +226,7 @@
     enableTermination();
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 void PluginProcess::initializeProcessName(const ChildProcessInitializationParameters&)
 {
 }

Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.h (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginProcess.h	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.h	2014-02-14 19:38:17 UTC (rev 164112)
@@ -51,7 +51,7 @@
 
     const String& pluginPath() const { return m_pluginPath; }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void setModalWindowIsShowing(bool);
     void setFullscreenWindowIsShowing(bool);
 
@@ -76,7 +76,7 @@
     virtual bool shouldTerminate() override;
     void platformInitializeProcess(const ChildProcessInitializationParameters&);
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
     virtual void stopRunLoop() override;
 #endif
 
@@ -102,7 +102,7 @@
     // The plug-in path.
     String m_pluginPath;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     String m_pluginBundleIdentifier;
 #endif
 
@@ -113,7 +113,7 @@
 
     RunLoop::Timer<PluginProcess> m_minimumLifetimeTimer;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // The Mach port used for accelerated compositing.
     mach_port_t m_compositingRenderServerPort;
 #endif

Modified: trunk/Source/WebKit2/PluginProcess/PluginProcess.messages.in (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/PluginProcess.messages.in	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/PluginProcess.messages.in	2014-02-14 19:38:17 UTC (rev 164112)
@@ -39,8 +39,8 @@
     # a DidClearSiteData message when done.
     ClearSiteData(Vector<String> sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
 
-#if PLATFORM(MAC)
     SetProcessSuppressionEnabled(bool flag)
+#if PLATFORM(COCOA)
     SetQOS(int latencyQOS, int throughputQOS)
 #endif
 }

Modified: trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp (164111 => 164112)


--- trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp	2014-02-14 19:26:32 UTC (rev 164111)
+++ trunk/Source/WebKit2/PluginProcess/WebProcessConnection.cpp	2014-02-14 19:38:17 UTC (rev 164112)
@@ -224,7 +224,7 @@
         return;
 
     wantsWheelEvents = pluginControllerProxyPtr->wantsWheelEvents();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     remoteLayerClientID = pluginControllerProxyPtr->remoteLayerClientID();
 #else
     UNUSED_PARAM(remoteLayerClientID);
@@ -247,7 +247,7 @@
         }
         
         // If its initialization is complete then we need to respond to this message with the correct information about its creation.
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         reply->send(true, pluginControllerProxy->wantsWheelEvents(), pluginControllerProxy->remoteLayerClientID());
 #else
         reply->send(true, pluginControllerProxy->wantsWheelEvents(), 0);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to