Stop using PLATFORM(MAC) in WebKit2/Shared except where it means “OS X but not iOS”
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Feb 2014 18:00:45 +0000 (18:00 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Feb 2014 18:00:45 +0000 (18:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128582

Reviewed by Darin Adler.

* Shared/API/c/WKContextMenuItem.cpp: Removed workaround for Mac Safari 6 compatibility.
(WKContextMenuItemGetTag):
* Shared/API/c/WKDeprecatedFunctions.cpp: Added && !PLATFORM(IOS), because these functions
are not needed on iOS.
* Shared/API/c/WKSharedAPICast.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/APIObject.h: Ditto.
* Shared/ChildProcess.cpp: Ditto.
* Shared/ChildProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) around
setApplicationIsDaemon and setQOS. Changed it to USE(APPKIT) around stopNSAppRunLoop.
* Shared/CommandLine.h: Changed PLATFORM(MAC) to OS(UNIX) around parse().
* Shared/DictionaryPopupInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):
* Shared/DictionaryPopupInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* Shared/Downloads/Download.h: Ditto.
* Shared/DrawingAreaInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* Shared/FontInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::FontInfo::encode):
(WebKit::FontInfo::decode):
* Shared/FontInfo.h: Ditto.
* Shared/LayerTreeContext.h: Ditto.
* Shared/NativeWebKeyboardEvent.h: Changed PLATFORM(MAC) to USE(APPKIT) around
forward-declaration of NSView.
* Shared/NativeWebMouseEvent.h: Ditto.
* Shared/NativeWebWheelEvent.h: Ditto.
* Shared/Network/CustomProtocols/Cocoa: Renamed from mac.
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: Renamed from CustomProtocolManagerMac.mm.
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerMac.mm: Removed.
* Shared/Network/CustomProtocols/CustomProtocolManager.h: Changed PLATFORM(MAC) to
PLATFORM(COCOA).
* Shared/Network/CustomProtocols/mac: Removed.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Removed.
* Shared/PlatformPopupMenuData.cpp:  Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::PlatformPopupMenuData::encode):
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h: Ditto.
* Shared/Plugins/Netscape/PluginInformation.cpp: Ditto.
* Shared/Plugins/PluginModuleInfo.h: Ditto.
* Shared/Plugins/PluginProcessCreationParameters.cpp: Ditto.
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h: Ditto.
* Shared/PrintInfo.h: Changed PLATFORM(MAC) to USE(APPKIT) around forward declaration of
NSPrintInfo.
* Shared/SandboxInitializationParameters.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* Shared/TextCheckerState.h: Changed PLATFORM(MAC) to USE(APPKIT).
* Shared/WebArchive.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* Shared/WebArchive.h: Ditto.
* Shared/WebArchiveResource.cpp: Ditto.
* Shared/WebArchiveResource.h: Ditto.
* Shared/WebCoreArgumentCoders.cpp: Ditto.
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
* Shared/WebCoreArgumentCoders.h: Ditto.
* Shared/WebEvent.h: Ditto.
* Shared/WebEventConversion.cpp: Ditto.
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Shared/WebKit2Initialize.cpp: Ditto.
(WebKit::InitializeWebKit2):
* Shared/WebPageCreationParameters.cpp: Ditto.
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h: Ditto.
* Shared/WebPreferencesStore.h: Ditto.
* Shared/WebProcessCreationParameters.cpp: Ditto.
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h: Ditto.
* Shared/WebWheelEvent.cpp: Ditto.
(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):
* Shared/cf/ArgumentCodersCF.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION).
(IPC::decode):
* Shared/mac/CommandLineMac.cpp: Removed.
* Shared/mac/PDFKitImports.h: Removed PLATFORM(MAC)
* Shared/posix: Added.
* Shared/posix/CommandLinePOSIX.cpp: Renamed from mac/CommandLineMac.cpp and removed
comment.
* WebKit2.xcodeproj/project.pbxproj: Updated for moves and renames.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

48 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
Source/WebKit2/Shared/API/c/WKSharedAPICast.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/Shared/ChildProcess.cpp
Source/WebKit2/Shared/ChildProcess.h
Source/WebKit2/Shared/CommandLine.h
Source/WebKit2/Shared/DictionaryPopupInfo.cpp
Source/WebKit2/Shared/DictionaryPopupInfo.h
Source/WebKit2/Shared/Downloads/Download.h
Source/WebKit2/Shared/DrawingAreaInfo.h
Source/WebKit2/Shared/FontInfo.cpp
Source/WebKit2/Shared/FontInfo.h
Source/WebKit2/Shared/LayerTreeContext.h
Source/WebKit2/Shared/NativeWebKeyboardEvent.h
Source/WebKit2/Shared/NativeWebMouseEvent.h
Source/WebKit2/Shared/NativeWebWheelEvent.h
Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm [moved from Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm with 100% similarity]
Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
Source/WebKit2/Shared/PlatformPopupMenuData.cpp
Source/WebKit2/Shared/PlatformPopupMenuData.h
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
Source/WebKit2/Shared/PrintInfo.h
Source/WebKit2/Shared/SandboxInitializationParameters.h
Source/WebKit2/Shared/TextCheckerState.h
Source/WebKit2/Shared/WebArchive.cpp
Source/WebKit2/Shared/WebArchive.h
Source/WebKit2/Shared/WebArchiveResource.cpp
Source/WebKit2/Shared/WebArchiveResource.h
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/WebEvent.h
Source/WebKit2/Shared/WebEventConversion.cpp
Source/WebKit2/Shared/WebKit2Initialize.cpp
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/Shared/WebPreferencesStore.h
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/Shared/WebWheelEvent.cpp
Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
Source/WebKit2/Shared/mac/PDFKitImports.h
Source/WebKit2/Shared/posix/CommandLinePOSIX.cpp [moved from Source/WebKit2/Shared/mac/CommandLineMac.cpp with 93% similarity]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 317dcd1..f8b6502 100644 (file)
@@ -1,3 +1,94 @@
+2014-02-11  Dan Bernstein  <mitz@apple.com>
+
+        Stop using PLATFORM(MAC) in WebKit2/Shared except where it means “OS X but not iOS”
+        https://bugs.webkit.org/show_bug.cgi?id=128582
+
+        Reviewed by Darin Adler.
+
+        * Shared/API/c/WKContextMenuItem.cpp: Removed workaround for Mac Safari 6 compatibility.
+        (WKContextMenuItemGetTag):
+        * Shared/API/c/WKDeprecatedFunctions.cpp: Added && !PLATFORM(IOS), because these functions
+        are not needed on iOS.
+        * Shared/API/c/WKSharedAPICast.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::toAPI):
+        (WebKit::toImpl):
+        * Shared/APIObject.h: Ditto.
+        * Shared/ChildProcess.cpp: Ditto.
+        * Shared/ChildProcess.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) around
+        setApplicationIsDaemon and setQOS. Changed it to USE(APPKIT) around stopNSAppRunLoop.
+        * Shared/CommandLine.h: Changed PLATFORM(MAC) to OS(UNIX) around parse().
+        * Shared/DictionaryPopupInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::DictionaryPopupInfo::encode):
+        (WebKit::DictionaryPopupInfo::decode):
+        * Shared/DictionaryPopupInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * Shared/Downloads/Download.h: Ditto.
+        * Shared/DrawingAreaInfo.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * Shared/FontInfo.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::FontInfo::encode):
+        (WebKit::FontInfo::decode):
+        * Shared/FontInfo.h: Ditto.
+        * Shared/LayerTreeContext.h: Ditto.
+        * Shared/NativeWebKeyboardEvent.h: Changed PLATFORM(MAC) to USE(APPKIT) around
+        forward-declaration of NSView.
+        * Shared/NativeWebMouseEvent.h: Ditto.
+        * Shared/NativeWebWheelEvent.h: Ditto.
+        * Shared/Network/CustomProtocols/Cocoa: Renamed from mac.
+        * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: Renamed from CustomProtocolManagerMac.mm.
+        * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerMac.mm: Removed.
+        * Shared/Network/CustomProtocols/CustomProtocolManager.h: Changed PLATFORM(MAC) to
+        PLATFORM(COCOA).
+        * Shared/Network/CustomProtocols/mac: Removed.
+        * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Removed.
+        * Shared/PlatformPopupMenuData.cpp:  Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        (WebKit::PlatformPopupMenuData::encode):
+        (WebKit::PlatformPopupMenuData::decode):
+        * Shared/PlatformPopupMenuData.h: Ditto.
+        * Shared/Plugins/Netscape/PluginInformation.cpp: Ditto.
+        * Shared/Plugins/PluginModuleInfo.h: Ditto.
+        * Shared/Plugins/PluginProcessCreationParameters.cpp: Ditto.
+        (WebKit::PluginProcessCreationParameters::encode):
+        (WebKit::PluginProcessCreationParameters::decode):
+        * Shared/Plugins/PluginProcessCreationParameters.h: Ditto.
+        * Shared/PrintInfo.h: Changed PLATFORM(MAC) to USE(APPKIT) around forward declaration of
+        NSPrintInfo.
+        * Shared/SandboxInitializationParameters.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * Shared/TextCheckerState.h: Changed PLATFORM(MAC) to USE(APPKIT).
+        * Shared/WebArchive.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
+        * Shared/WebArchive.h: Ditto.
+        * Shared/WebArchiveResource.cpp: Ditto.
+        * Shared/WebArchiveResource.h: Ditto.
+        * Shared/WebCoreArgumentCoders.cpp: Ditto.
+        (IPC::ArgumentCoder<ResourceResponse>::encode):
+        (IPC::ArgumentCoder<ResourceResponse>::decode):
+        * Shared/WebCoreArgumentCoders.h: Ditto.
+        * Shared/WebEvent.h: Ditto.
+        * Shared/WebEventConversion.cpp: Ditto.
+        (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
+        * Shared/WebKit2Initialize.cpp: Ditto.
+        (WebKit::InitializeWebKit2):
+        * Shared/WebPageCreationParameters.cpp: Ditto.
+        (WebKit::WebPageCreationParameters::encode):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h: Ditto.
+        * Shared/WebPreferencesStore.h: Ditto.
+        * Shared/WebProcessCreationParameters.cpp: Ditto.
+        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
+        (WebKit::WebProcessCreationParameters::encode):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h: Ditto.
+        * Shared/WebWheelEvent.cpp: Ditto.
+        (WebKit::WebWheelEvent::WebWheelEvent):
+        (WebKit::WebWheelEvent::encode):
+        (WebKit::WebWheelEvent::decode):
+        * Shared/cf/ArgumentCodersCF.cpp: Changed PLATFORM(MAC) to USE(FOUNDATION).
+        (IPC::decode):
+        * Shared/mac/CommandLineMac.cpp: Removed.
+        * Shared/mac/PDFKitImports.h: Removed PLATFORM(MAC)
+        * Shared/posix: Added.
+        * Shared/posix/CommandLinePOSIX.cpp: Renamed from mac/CommandLineMac.cpp and removed
+        comment.
+        * WebKit2.xcodeproj/project.pbxproj: Updated for moves and renames.
+
 2014-02-11  Brady Eidson  <beidson@apple.com>
 
         IDB: storage/indexeddb/mozilla/cursor-update-updates-indexes.html ASSERTs
index 53064ff..b5e2e08 100644 (file)
 #include "WKAPICast.h"
 #include "WKContextMenuItemTypes.h"
 
-#if PLATFORM(MAC)
-#import <mach-o/dyld.h>
-#endif
-
 using namespace WebCore;
 using namespace WebKit;
 
@@ -94,38 +90,10 @@ WKContextMenuItemRef WKContextMenuItemSeparatorItem()
 #endif
 }
 
-#if ENABLE(CONTEXT_MENUS)
-#if PLATFORM(MAC)
-static WKContextMenuItemTag compatibleContextMenuItemTag(WKContextMenuItemTag tag)
-{
-    static bool needsWorkaround = ^bool {
-        const int32_t safariFrameworkVersionWithIncompatibleContextMenuItemTags = 0x02181900; // 536.25.0 (Safari 6.0)
-        return NSVersionOfRunTimeLibrary("Safari") == safariFrameworkVersionWithIncompatibleContextMenuItemTags;
-    }();
-
-    if (!needsWorkaround)
-        return tag;
-
-    // kWKContextMenuItemTagDictationAlternative was inserted before kWKContextMenuItemTagInspectElement.
-    // DictationAlternative is now at the end like it should have been. To be compatible we need to return
-    // InspectElement for DictationAlternative and shift InspectElement and after by one.
-    if (tag == kWKContextMenuItemTagDictationAlternative)
-        return kWKContextMenuItemTagInspectElement;
-    if (tag >= kWKContextMenuItemTagInspectElement && tag < kWKContextMenuItemBaseApplicationTag)
-        return tag + 1;
-    return tag;
-}
-#endif
-#endif // ENABLE(CONTEXT_MENUS)
-
 WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef)
 {
 #if ENABLE(CONTEXT_MENUS)
-#if PLATFORM(MAC)
-    return compatibleContextMenuItemTag(toAPI(toImpl(itemRef)->data()->action()));
-#else
     return toAPI(toImpl(itemRef)->data()->action());
-#endif
 #else
     UNUSED_PARAM(itemRef);
     return toAPI(ContextMenuItemTagNoAction);
index a66dd96..09b1e7e 100644 (file)
@@ -30,7 +30,7 @@
 #include "WKMutableDictionary.h"
 #include "WKSharedAPICast.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 #include "WKContextPrivateMac.h"
 #endif
 
@@ -47,7 +47,7 @@ WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRe
 WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
 WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key);
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext);
 #endif
 }
@@ -76,7 +76,7 @@ void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionaryRef, WKStringRef ke
     toImpl(dictionaryRef)->remove(toImpl(keyRef)->string());
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext)
 {
     return nullptr;
index 8439dbc..5950a69 100644 (file)
@@ -118,7 +118,7 @@ WK_ADD_API_MAPPING(WKSessionRef, API::Session)
 
 template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array* ImplType; };
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 WK_ADD_API_MAPPING(WKWebArchiveRef, WebArchive)
 WK_ADD_API_MAPPING(WKWebArchiveResourceRef, WebArchiveResource)
 WK_ADD_API_MAPPING(WKObjCTypeWrapperRef, ObjCObjectGraph)
@@ -482,7 +482,7 @@ inline WKContextMenuItemTag toAPI(WebCore::ContextMenuAction action)
         return kWKContextMenuItemTagMediaPlayPause;
     case WebCore::ContextMenuItemTagMediaMute:
         return kWKContextMenuItemTagMediaMute;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     case WebCore::ContextMenuItemTagCorrectSpellingAutomatically:
         return kWKContextMenuItemTagCorrectSpellingAutomatically;
     case WebCore::ContextMenuItemTagSubstitutionsMenu:
@@ -676,7 +676,7 @@ inline WebCore::ContextMenuAction toImpl(WKContextMenuItemTag tag)
         return WebCore::ContextMenuItemTagMediaPlayPause;
     case kWKContextMenuItemTagMediaMute:
         return WebCore::ContextMenuItemTagMediaMute;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     case kWKContextMenuItemTagCorrectSpellingAutomatically:
         return WebCore::ContextMenuItemTagCorrectSpellingAutomatically;
     case kWKContextMenuItemTagSubstitutionsMenu:
index 38155d1..3e124c6 100644 (file)
 #include <wtf/RefPtr.h>
 #include <wtf/ThreadSafeRefCounted.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "WKFoundation.h"
 #ifdef __OBJC__
 #include "WKObject.h"
 #endif
 #endif
 
-#define DELEGATE_REF_COUNTING_TO_COCOA (PLATFORM(MAC) && WK_API_ENABLED)
+#define DELEGATE_REF_COUNTING_TO_COCOA (PLATFORM(COCOA) && WK_API_ENABLED)
 
 #if DELEGATE_REF_COUNTING_TO_COCOA
 OBJC_CLASS NSObject;
index b25f51d..d90d447 100644 (file)
@@ -163,7 +163,7 @@ void ChildProcess::terminate()
     stopRunLoop();
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 void ChildProcess::platformInitialize()
 {
 }
index 02a68f8..2c9f43b 100644 (file)
@@ -65,7 +65,7 @@ public:
     void setProcessSuppressionEnabled(bool);
     bool processSuppressionEnabled() const { return !m_processSuppressionDisabled.isActive(); }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void setApplicationIsDaemon();
     void setQOS(int latencyQOS, int throughputQOS);
 #endif
@@ -90,7 +90,7 @@ protected:
 
     virtual void stopRunLoop();
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
     static void stopNSAppRunLoop();
 #endif
 
index f5955e7..9603515 100644 (file)
@@ -37,7 +37,7 @@ namespace WebKit {
 
 class CommandLine {
 public:
-#if PLATFORM(MAC)
+#if OS(UNIX)
     bool parse(int argc, char** argv);
 #endif
     String operator[](const String& key) const
index e15dae6..2436807 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "WebCoreArgumentCoders.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "ArgumentCodersCF.h"
 #endif
 
@@ -38,7 +38,7 @@ void DictionaryPopupInfo::encode(IPC::ArgumentEncoder& encoder) const
 {
     encoder << origin;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool hadOptions = options;
     encoder << hadOptions;
     if (hadOptions)
@@ -50,7 +50,7 @@ bool DictionaryPopupInfo::decode(IPC::ArgumentDecoder& decoder, DictionaryPopupI
 {
     if (!decoder.decode(result.origin))
         return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool hadOptions;
     if (!decoder.decode(hadOptions))
         return false;
index 7a0aa95..f609276 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <WebCore/FloatPoint.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -44,7 +44,7 @@ struct DictionaryPopupInfo {
     static bool decode(IPC::ArgumentDecoder&, DictionaryPopupInfo&);
 
     WebCore::FloatPoint origin;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<CFDictionaryRef> options;
 #endif
 };
index d67a04a..3f380f1 100644 (file)
@@ -30,7 +30,7 @@
 #include <WebCore/ResourceRequest.h>
 #include <wtf/Noncopyable.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 
 OBJC_CLASS NSURLDownload;
@@ -119,7 +119,7 @@ private:
 
     RefPtr<SandboxExtension> m_sandboxExtension;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<NSURLDownload> m_nsURLDownload;
     RetainPtr<WKDownloadAsDelegate> m_delegate;
 #endif
index 16a3bd5..86877aa 100644 (file)
@@ -29,7 +29,7 @@
 namespace WebKit {
 
 enum DrawingAreaType {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #if !PLATFORM(IOS)
     DrawingAreaTypeTiledCoreAnimation,
 #endif
index 7743d72..efd7f36 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "WebCoreArgumentCoders.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "ArgumentCodersCF.h"
 #endif
 
@@ -36,7 +36,7 @@ namespace WebKit {
 
 void FontInfo::encode(IPC::ArgumentEncoder& encoder) const
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << static_cast<bool>(fontAttributeDictionary);
     if (fontAttributeDictionary)
         IPC::encode(encoder, fontAttributeDictionary.get());
@@ -47,7 +47,7 @@ void FontInfo::encode(IPC::ArgumentEncoder& encoder) const
 
 bool FontInfo::decode(IPC::ArgumentDecoder& decoder, FontInfo& fontInfo)
 {    
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool hasFontAttributeDictionary;
     if (!decoder.decode(hasFontAttributeDictionary))
         return false;
index 8f15635..17fd4a1 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FontInfo_h
 #define FontInfo_h
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/RetainPtr.h>
 #endif
 
@@ -41,7 +41,7 @@ struct FontInfo {
     void encode(IPC::ArgumentEncoder&) const;
     static bool decode(IPC::ArgumentDecoder&, FontInfo&);
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     RetainPtr<CFDictionaryRef> fontAttributeDictionary;
 #endif
 };
index 51a15ce..62c357c 100644 (file)
@@ -52,7 +52,7 @@ public:
 
     bool isEmpty() const;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     uint32_t contextID;
 #elif PLATFORM(GTK)
     uint64_t windowHandle;
index dfc83e3..47c1dfd 100644 (file)
 
 #include "WebEvent.h"
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
 #include <wtf/RetainPtr.h>
 OBJC_CLASS NSView;
-#elif PLATFORM(GTK)
+#endif
+
+#if PLATFORM(EFL)
+#include <Evas.h>
+#endif
+
+#if PLATFORM(GTK)
 #include <WebCore/CompositionResults.h>
 #include <WebCore/GUniquePtrGtk.h>
 #include <WebCore/GtkInputMethodFilter.h>
 typedef union _GdkEvent GdkEvent;
-#elif PLATFORM(EFL)
-#include <Evas.h>
 #endif
 
 #if PLATFORM(IOS)
+#include <wtf/RetainPtr.h>
 OBJC_CLASS WebIOSEvent;
 #endif
 
index 2b77ffe..231b03f 100644 (file)
 
 #include "WebEvent.h"
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
 #include <wtf/RetainPtr.h>
 OBJC_CLASS NSView;
-#elif PLATFORM(GTK)
-#include <WebCore/GUniquePtrGtk.h>
-typedef union _GdkEvent GdkEvent;
-#elif PLATFORM(EFL)
+#endif
+
+#if PLATFORM(EFL)
 #include <Evas.h>
 #include <WebCore/AffineTransform.h>
 #endif
 
+#if PLATFORM(GTK)
+#include <WebCore/GUniquePtrGtk.h>
+typedef union _GdkEvent GdkEvent;
+#endif
+
 namespace WebKit {
 
 class NativeWebMouseEvent : public WebMouseEvent {
index aed301c..46de554 100644 (file)
 
 #include "WebEvent.h"
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
 #include <wtf/RetainPtr.h>
 OBJC_CLASS NSView;
-#elif PLATFORM(GTK)
-#include <WebCore/GUniquePtrGtk.h>
-typedef union _GdkEvent GdkEvent;
-#elif PLATFORM(EFL)
+#endif
+
+#if PLATFORM(EFL)
 #include <Evas.h>
 #include <WebCore/AffineTransform.h>
 #endif
 
+#if PLATFORM(GTK)
+#include <WebCore/GUniquePtrGtk.h>
+typedef union _GdkEvent GdkEvent;
+#endif
+
 namespace WebKit {
 
 class NativeWebWheelEvent : public WebWheelEvent {
index fda8107..a1f7bf7 100644 (file)
@@ -34,7 +34,7 @@
 #include "WorkQueue.h"
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/RetainPtr.h>
@@ -71,7 +71,7 @@ public:
     void unregisterScheme(const String&);
     bool supportsScheme(const String&);
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void addCustomProtocol(WKCustomProtocol *);
     void removeCustomProtocol(WKCustomProtocol *);
 #endif
@@ -99,7 +99,7 @@ private:
     ChildProcess* m_childProcess;
     RefPtr<WorkQueue> m_messageQueue;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     HashSet<String> m_registeredSchemes;
     Mutex m_registeredSchemesMutex;
 
index 49da130..b2c75a9 100644 (file)
@@ -36,7 +36,7 @@ PlatformPopupMenuData::PlatformPopupMenuData()
 
 void PlatformPopupMenuData::encode(IPC::ArgumentEncoder& encoder) const
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << fontInfo;
     encoder << shouldPopOver;
 #else
@@ -46,7 +46,7 @@ void PlatformPopupMenuData::encode(IPC::ArgumentEncoder& encoder) const
 
 bool PlatformPopupMenuData::decode(IPC::ArgumentDecoder& decoder, PlatformPopupMenuData& data)
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!decoder.decode(data.fontInfo))
         return false;
     if (!decoder.decode(data.shouldPopOver))
index 10207fe..ccb5aee 100644 (file)
@@ -43,7 +43,7 @@ struct PlatformPopupMenuData {
     void encode(IPC::ArgumentEncoder&) const;
     static bool decode(IPC::ArgumentDecoder&, PlatformPopupMenuData&);
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     FontInfo fontInfo;
     bool shouldPopOver;
 #endif
index ec15420..f18848a 100644 (file)
@@ -164,7 +164,7 @@ PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String&
     return ImmutableDictionary::create(std::move(map));
 }
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&)
 {
 }
index bc03029..6232b51 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <WebCore/PluginData.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include <mach/machine.h>
 #endif
 
@@ -50,7 +50,7 @@ struct PluginModuleInfo {
     String path;
     WebCore::PluginInfo info;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     cpu_type_t pluginArchitecture;
     String bundleIdentifier;
     String versionString;
index a53fdef..bfbdda2 100644 (file)
@@ -43,7 +43,7 @@ void PluginProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) cons
     encoder << supportsAsynchronousPluginInitialization;
     encoder << minimumLifetime;
     encoder << terminationTimeout;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << acceleratedCompositingPort;
 #endif
 }
@@ -58,7 +58,7 @@ bool PluginProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, Plug
         return false;
     if (!decoder.decode(result.terminationTimeout))
         return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!decoder.decode(result.acceleratedCompositingPort))
         return false;
 #endif
index e0f9d6b..ac96368 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "PluginProcessAttributes.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "MachPort.h"
 #endif
 
@@ -53,7 +53,7 @@ struct PluginProcessCreationParameters {
     double minimumLifetime;
     double terminationTimeout;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     IPC::MachPort acceleratedCompositingPort;
 #endif
 };
index c037ccf..8be9f8d 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef PrintInfo_h
 #define PrintInfo_h
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
 OBJC_CLASS NSPrintInfo;
 #elif PLATFORM(GTK)
 typedef struct _GtkPrintSettings GtkPrintSettings;
index a6621c5..5c9bbe3 100644 (file)
@@ -29,7 +29,7 @@
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 OBJC_CLASS NSString;
 #endif
 
@@ -41,7 +41,7 @@ public:
     SandboxInitializationParameters();
     ~SandboxInitializationParameters();
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     // Name must be a literal.
     void addConfDirectoryParameter(const char* name, int confID);
     void addPathParameter(const char* name, NSString *path);
@@ -91,7 +91,7 @@ public:
 #endif
 
 private:
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     void appendPathInternal(const char* name, const char* path);
 
     mutable Vector<const char*> m_namedParameters;
@@ -102,7 +102,7 @@ private:
 #endif
 };
 
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
 SandboxInitializationParameters::SandboxInitializationParameters()
 {
 }
index 0473032..bcc9fec 100644 (file)
@@ -34,7 +34,7 @@ struct TextCheckerState {
     bool isContinuousSpellCheckingEnabled;
     bool isGrammarCheckingEnabled;
 
-#if PLATFORM(MAC)
+#if USE(APPKIT)
     bool isAutomaticSpellingCorrectionEnabled;
     bool isAutomaticQuoteSubstitutionEnabled;
     bool isAutomaticDashSubstitutionEnabled;
index 02dec12..0b65abe 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "WebArchive.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 #include "APIArray.h"
 #include "APIData.h"
@@ -157,4 +157,4 @@ LegacyWebArchive* WebArchive::coreLegacyWebArchive()
 
 } // namespace WebKit
 
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
index daddb87..e6bb64e 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef WebArchive_h
 #define WebArchive_h
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 #include "APIObject.h"
 #include <wtf/PassRefPtr.h>
@@ -76,6 +76,6 @@ private:
 
 } // namespace WebKit
 
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
 
 #endif // WebArchive_h
index c495099..9889f6f 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "WebArchiveResource.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 #include "APIData.h"
 #include <WebCore/ArchiveResource.h>
@@ -99,4 +99,4 @@ ArchiveResource* WebArchiveResource::coreArchiveResource()
 
 } // namespace WebKit
 
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
index d8c7304..1cc7036 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef WebArchiveResource_h
 #define WebArchiveResource_h
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 #include "APIObject.h"
 #include <wtf/Forward.h>
@@ -67,6 +67,6 @@ private:
 
 } // namespace WebKit
 
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
 
 #endif // WebArchiveResource_h
index 5592cf0..173e3d3 100644 (file)
@@ -574,7 +574,7 @@ bool ArgumentCoder<ResourceRequest>::decode(ArgumentDecoder& decoder, ResourceRe
 
 void ArgumentCoder<ResourceResponse>::encode(ArgumentEncoder& encoder, const ResourceResponse& resourceResponse)
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool shouldSerializeWebCoreData = !resourceResponse.platformResponseIsUpToDate();
     encoder << shouldSerializeWebCoreData;
 #else
@@ -603,7 +603,7 @@ void ArgumentCoder<ResourceResponse>::encode(ArgumentEncoder& encoder, const Res
 
 bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder& decoder, ResourceResponse& resourceResponse)
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     bool hasSerializedWebCoreData;
     if (!decoder.decode(hasSerializedWebCoreData))
         return false;
index 4a80f29..a4e264f 100644 (file)
@@ -83,7 +83,7 @@ struct ViewportAttributes;
 struct WindowFeatures;
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 namespace WebCore {
 struct KeypressCommand;
 }
@@ -214,7 +214,7 @@ template<> struct ArgumentCoder<WebCore::Cursor> {
 };
 
 template<> struct ArgumentCoder<WebCore::ResourceRequest> {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     static const bool kShouldSerializeWebCoreData = false;
 #else
     static const bool kShouldSerializeWebCoreData = true;
@@ -234,7 +234,7 @@ template<> struct ArgumentCoder<WebCore::ResourceResponse> {
 };
 
 template<> struct ArgumentCoder<WebCore::ResourceError> {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     static const bool kShouldSerializeWebCoreData = false;
 #else
     static const bool kShouldSerializeWebCoreData = true;
@@ -256,7 +256,7 @@ template<> struct ArgumentCoder<WebCore::Color> {
     static bool decode(ArgumentDecoder&, WebCore::Color&);
 };
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 template<> struct ArgumentCoder<WebCore::KeypressCommand> {
     static void encode(ArgumentEncoder&, const WebCore::KeypressCommand&);
     static bool decode(ArgumentDecoder&, WebCore::KeypressCommand&);
index b5bbb58..b7a198e 100644 (file)
@@ -150,7 +150,7 @@ public:
         ScrollByPixelWheelEvent
     };
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     enum Phase {
         PhaseNone        = 0,
         PhaseBegan       = 1 << 0,
@@ -165,7 +165,7 @@ public:
     WebWheelEvent() { }
 
     WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, bool directionInvertedFromDevice, Phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, Modifiers, double timestamp);
 #endif
 
@@ -175,7 +175,7 @@ public:
     const WebCore::FloatSize wheelTicks() const { return m_wheelTicks; }
     Granularity granularity() const { return static_cast<Granularity>(m_granularity); }
     bool directionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     Phase phase() const { return static_cast<Phase>(m_phase); }
     Phase momentumPhase() const { return static_cast<Phase>(m_momentumPhase); }
     bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
@@ -195,7 +195,7 @@ private:
     WebCore::FloatSize m_wheelTicks;
     uint32_t m_granularity; // Granularity
     bool m_directionInvertedFromDevice;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     uint32_t m_phase; // Phase
     uint32_t m_momentumPhase; // Phase
     bool m_hasPreciseScrollingDeltas;
index 03fd0ed..9e05656 100644 (file)
@@ -128,7 +128,7 @@ public:
         m_wheelTicksY = webEvent.wheelTicks().height();
         m_granularity = (webEvent.granularity() == WebWheelEvent::ScrollByPageWheelEvent) ? WebCore::ScrollByPageWheelEvent : WebCore::ScrollByPixelWheelEvent;
         m_directionInvertedFromDevice = webEvent.directionInvertedFromDevice();
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
         m_phase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.phase());
         m_momentumPhase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.momentumPhase());
         m_hasPreciseScrollingDeltas = webEvent.hasPreciseScrollingDeltas();
index ef3cd94..651d593 100644 (file)
@@ -32,7 +32,7 @@
 #include <wtf/MainThread.h>
 #include <wtf/RunLoop.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "WebSystemInterface.h"
 #endif
 #if PLATFORM(IOS)
@@ -43,7 +43,7 @@ namespace WebKit {
 
 void InitializeWebKit2()
 {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     InitWebCoreSystemInterface();
 #endif
 #if PLATFORM(IOS)
index 0003489..9c9e476 100644 (file)
@@ -62,7 +62,7 @@ void WebPageCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
     encoder << backgroundExtendsBeyondPage;
     encoder.encodeEnum(layerHostingMode);
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << colorSpace;
 #endif
 }
@@ -126,7 +126,7 @@ bool WebPageCreationParameters::decode(IPC::ArgumentDecoder& decoder, WebPageCre
     if (!decoder.decodeEnum(parameters.layerHostingMode))
         return false;
     
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!decoder.decode(parameters.colorSpace))
         return false;
 #endif
index bdca723..a340251 100644 (file)
@@ -39,7 +39,7 @@
 #include <WebCore/ViewState.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "ColorSpaceData.h"
 #endif
 
@@ -101,7 +101,7 @@ struct WebPageCreationParameters {
 
     LayerHostingMode layerHostingMode;
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     ColorSpaceData colorSpace;
 #endif
 };
index 742d817..5013542 100644 (file)
@@ -54,7 +54,7 @@ namespace WebKit {
 #define DEFAULT_SCREEN_FONT_SUBSTITUTION_ENABLED true
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #define DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED true
 #define DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED true
 #define DEFAULT_PDFPLUGIN_ENABLED true
@@ -216,7 +216,7 @@ namespace WebKit {
     macro(InspectorAttachmentSide, inspectorAttachmentSide, UInt32, uint32_t, 0) \
     \
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 
 #define FOR_EACH_WEBKIT_FONT_FAMILY_PREFERENCE(macro) \
     macro(StandardFontFamily, standardFontFamily, String, String, "Times") \
index e80dc9e..92d929f 100644 (file)
@@ -35,7 +35,7 @@ WebProcessCreationParameters::WebProcessCreationParameters()
     , shouldAlwaysUseComplexTextCodePath(false)
     , shouldUseFontSmoothing(true)
     , defaultRequestTimeoutInterval(INT_MAX)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , nsURLCacheMemoryCapacity(0)
     , nsURLCacheDiskCapacity(0)
     , shouldForceScreenFontSubstitution(false)
@@ -96,10 +96,10 @@ void WebProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
     encoder << textCheckerState;
     encoder << fullKeyboardAccessEnabled;
     encoder << defaultRequestTimeoutInterval;
-#if PLATFORM(MAC) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFNETWORK)
     encoder << uiProcessBundleIdentifier;
 #endif
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << presenterApplicationPid;
     encoder << accessibilityEnhancedUserInterfaceEnabled;
     encoder << nsURLCacheMemoryCapacity;
@@ -209,12 +209,12 @@ bool WebProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, WebProc
         return false;
     if (!decoder.decode(parameters.defaultRequestTimeoutInterval))
         return false;
-#if PLATFORM(MAC) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFNETWORK)
     if (!decoder.decode(parameters.uiProcessBundleIdentifier))
         return false;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!decoder.decode(parameters.presenterApplicationPid))
         return false;
     if (!decoder.decode(parameters.accessibilityEnhancedUserInterfaceEnabled))
index de54ff8..1b624ca 100644 (file)
@@ -34,7 +34,7 @@
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 #include "MachPort.h"
 #endif
 
@@ -112,11 +112,11 @@ struct WebProcessCreationParameters {
 
     double defaultRequestTimeoutInterval;
 
-#if PLATFORM(MAC) || USE(CFNETWORK)
+#if PLATFORM(COCOA) || USE(CFNETWORK)
     String uiProcessBundleIdentifier;
 #endif
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     pid_t presenterApplicationPid;
 
     bool accessibilityEnhancedUserInterfaceEnabled;
@@ -132,7 +132,7 @@ struct WebProcessCreationParameters {
     bool shouldForceScreenFontSubstitution;
     bool shouldEnableKerningAndLigaturesByDefault;
     bool shouldEnableFTL;
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
 
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     HashMap<String, bool> notificationPermissions;
index fe3b973..d250a14 100644 (file)
@@ -41,7 +41,7 @@ WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint
     , m_wheelTicks(wheelTicks)
     , m_granularity(granularity)
     , m_directionInvertedFromDevice(false)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     , m_phase(PhaseNone)
     , m_hasPreciseScrollingDeltas(false)
     , m_scrollCount(0)
@@ -50,7 +50,7 @@ WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint
     ASSERT(isWheelEventType(type));
 }
 
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
 WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, bool directionInvertedFromDevice, Phase phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, Modifiers modifiers, double timestamp)
     : WebEvent(type, modifiers, timestamp)
     , m_position(position)
@@ -79,7 +79,7 @@ void WebWheelEvent::encode(IPC::ArgumentEncoder& encoder) const
     encoder << m_wheelTicks;
     encoder << m_granularity;
     encoder << m_directionInvertedFromDevice;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     encoder << m_phase;
     encoder << m_momentumPhase;
     encoder << m_hasPreciseScrollingDeltas;
@@ -104,7 +104,7 @@ bool WebWheelEvent::decode(IPC::ArgumentDecoder& decoder, WebWheelEvent& t)
         return false;
     if (!decoder.decode(t.m_directionInvertedFromDevice))
         return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
     if (!decoder.decode(t.m_phase))
         return false;
     if (!decoder.decode(t.m_momentumPhase))
index 3f94c1a..9fde197 100644 (file)
@@ -32,7 +32,7 @@
 #include <WebCore/CFURLExtras.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
 #import <Foundation/Foundation.h>
 #endif
 
@@ -524,7 +524,7 @@ bool decode(ArgumentDecoder& decoder, RetainPtr<CFURLRef>& result)
     if (!decoder.decode(urlBytes))
         return false;
 
-#if PLATFORM(MAC)
+#if USE(FOUNDATION)
     // FIXME: Move this to ArgumentCodersCFMac.mm and change this file back to be C++
     // instead of Objective-C++.
     if (urlBytes.isEmpty()) {
index 5edd032..a1a13d3 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef PDFKitImports_h
 #define PDFKitImports_h
 
-#if PLATFORM(MAC)
-
 namespace WebKit {
 
 NSString *pdfKitFrameworkPath();
@@ -43,6 +41,4 @@ Class pdfAnnotationChoiceWidgetClass();
 
 }
 
-#endif // PLATFORM(MAC)
-
 #endif // PDFKitImports_h
@@ -28,9 +28,6 @@
 
 namespace WebKit {
 
-// FIXME: There's nothing Mac specific about this command line parser.
-// Maybe we should move it to CommandLinePosix.cpp instead.
-
 bool CommandLine::parse(int argc, char** argv)
 {
     if ((argc % 2))
index ad14b0c..5e1d3f9 100644 (file)
                1A64245F12DE29A100CAAE2C /* UpdateInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */; };
                1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */; };
                1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
-               1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */; };
+               1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */; };
                1A6FB7AE11E64B6800DB1371 /* PluginView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */; };
                1A6FB7AF11E64B6800DB1371 /* PluginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6FB7AD11E64B6800DB1371 /* PluginView.h */; };
                1A6FB7D211E651E200DB1371 /* Plugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FB7D011E651E200DB1371 /* Plugin.cpp */; };
                2984F57D164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */; };
                2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2984F586164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp */; };
                2984F589164BA095004BC0C6 /* CustomProtocolManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2984F587164BA095004BC0C6 /* CustomProtocolManagerMessages.h */; };
-               2989A411167D1834004F96D2 /* CustomProtocolManagerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2989A410167D1834004F96D2 /* CustomProtocolManagerMac.mm */; };
+               2989A411167D1834004F96D2 /* CustomProtocolManagerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2989A410167D1834004F96D2 /* CustomProtocolManagerCocoa.mm */; };
                2989A414167D184B004F96D2 /* CustomProtocolManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2989A412167D184B004F96D2 /* CustomProtocolManager.h */; };
                29AD3093164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 29AD3092164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h */; };
                29AD3096164B4C930072DEA9 /* CustomProtocolManagerProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29AD3095164B4C930072DEA9 /* CustomProtocolManagerProxyMac.mm */; };
                1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UpdateInfo.cpp; sourceTree = "<group>"; };
                1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewInternal.h; sourceTree = "<group>"; };
                1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
-               1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLineMac.cpp; sourceTree = "<group>"; };
+               1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLinePOSIX.cpp; sourceTree = "<group>"; };
                1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginView.cpp; sourceTree = "<group>"; };
                1A6FB7AD11E64B6800DB1371 /* PluginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginView.h; sourceTree = "<group>"; };
                1A6FB7D011E651E200DB1371 /* Plugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Plugin.cpp; sourceTree = "<group>"; };
                2984F57B164B915F004BC0C6 /* CustomProtocolManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomProtocolManagerProxyMessages.h; sourceTree = "<group>"; };
                2984F586164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomProtocolManagerMessageReceiver.cpp; sourceTree = "<group>"; };
                2984F587164BA095004BC0C6 /* CustomProtocolManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomProtocolManagerMessages.h; sourceTree = "<group>"; };
-               2989A410167D1834004F96D2 /* CustomProtocolManagerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomProtocolManagerMac.mm; path = Network/CustomProtocols/mac/CustomProtocolManagerMac.mm; sourceTree = "<group>"; };
+               2989A410167D1834004F96D2 /* CustomProtocolManagerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomProtocolManagerCocoa.mm; sourceTree = "<group>"; };
                2989A412167D184B004F96D2 /* CustomProtocolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManager.h; path = Network/CustomProtocols/CustomProtocolManager.h; sourceTree = "<group>"; };
                2989A413167D184B004F96D2 /* CustomProtocolManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CustomProtocolManager.messages.in; path = Network/CustomProtocols/CustomProtocolManager.messages.in; sourceTree = "<group>"; };
                29AD3092164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomProtocolManagerProxy.h; path = CustomProtocols/CustomProtocolManagerProxy.h; sourceTree = "<group>"; };
                                BC111B5A112F628200337BAB /* mac */,
                                51A8A60D1627F2AC000D90E9 /* Network */,
                                1AAE058C1279DCD400852418 /* Plugins */,
+                               3709504918A9FAD20087AE5D /* posix */,
                                0F5947A0187B3B7100437857 /* Scrolling */,
                                BC64696D11DBE603006455B0 /* APIArray.cpp */,
                                BC64696E11DBE603006455B0 /* APIArray.h */,
                2989A40E167D1813004F96D2 /* CustomProtocols */ = {
                        isa = PBXGroup;
                        children = (
-                               2989A40F167D181B004F96D2 /* mac */,
+                               2989A40F167D181B004F96D2 /* Cocoa */,
                                2989A412167D184B004F96D2 /* CustomProtocolManager.h */,
                                2989A413167D184B004F96D2 /* CustomProtocolManager.messages.in */,
                        );
                        name = CustomProtocols;
                        sourceTree = "<group>";
                };
-               2989A40F167D181B004F96D2 /* mac */ = {
+               2989A40F167D181B004F96D2 /* Cocoa */ = {
                        isa = PBXGroup;
                        children = (
-                               2989A410167D1834004F96D2 /* CustomProtocolManagerMac.mm */,
+                               2989A410167D1834004F96D2 /* CustomProtocolManagerCocoa.mm */,
                        );
-                       name = mac;
+                       name = Cocoa;
+                       path = Network/CustomProtocols/Cocoa;
                        sourceTree = "<group>";
                };
                29AD3091164B4C100072DEA9 /* CustomProtocols */ = {
                        path = foundation;
                        sourceTree = "<group>";
                };
+               3709504918A9FAD20087AE5D /* posix */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */,
+                       );
+                       path = posix;
+                       sourceTree = "<group>";
+               };
                37C4C08318149C2A003688B9 /* Cocoa */ = {
                        isa = PBXGroup;
                        children = (
                                9F54F88E16488E87007DF81A /* ChildProcessMac.mm */,
                                1A2A4AFE158693920090C9E9 /* ColorSpaceData.h */,
                                1A2A4AFD158693920090C9E9 /* ColorSpaceData.mm */,
-                               1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */,
                                CDC3830D1721242D008A2FC3 /* CookieStorageShim.mm */,
                                CDC3830E1721242D008A2FC3 /* CookieStorageShim.h */,
                                CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */,
                                9F54F88F16488E87007DF81A /* ChildProcessMac.mm in Sources */,
                                E1513C66166EABB200149FCB /* ChildProcessProxy.cpp in Sources */,
                                1A2A4B0E1586A2240090C9E9 /* ColorSpaceData.mm in Sources */,
-                               1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */,
+                               1A6F9FB711E1408500DB1371 /* CommandLinePOSIX.cpp in Sources */,
                                BC032DAA10F437D10058C15A /* Connection.cpp in Sources */,
                                2DA944A31884E4F000ED86DB /* WebTouchEventIOS.cpp in Sources */,
                                1A30EAC6115D7DA30053E937 /* ConnectionMac.cpp in Sources */,
                                2DA049B3180CCCD300AAFA9E /* PlatformCALayerRemote.cpp in Sources */,
                                CDC3831017212440008A2FC3 /* CookieStorageShim.mm in Sources */,
                                B878B616133428DC006888E9 /* CorrectionPanel.mm in Sources */,
-                               2989A411167D1834004F96D2 /* CustomProtocolManagerMac.mm in Sources */,
+                               2989A411167D1834004F96D2 /* CustomProtocolManagerCocoa.mm in Sources */,
                                2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */,
                                29AD3096164B4C930072DEA9 /* CustomProtocolManagerProxyMac.mm in Sources */,
                                0FF24A2D1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp in Sources */,