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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 317dcd1..f8b6502 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -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
diff --git a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
index 53064ff..b5e2e08 100644
--- a/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
+++ b/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
@@ -32,10 +32,6 @@
#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 @@
#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);
diff --git a/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
index a66dd96..09b1e7e 100644
--- a/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
+++ b/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
@@ -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 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 @@
toImpl(dictionaryRef)->remove(toImpl(keyRef)->string());
}
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext)
{
return nullptr;
diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
index 8439dbc..5950a69 100644
--- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -118,7 +118,7 @@
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 @@
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 @@
return WebCore::ContextMenuItemTagMediaPlayPause;
case kWKContextMenuItemTagMediaMute:
return WebCore::ContextMenuItemTagMediaMute;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
case kWKContextMenuItemTagCorrectSpellingAutomatically:
return WebCore::ContextMenuItemTagCorrectSpellingAutomatically;
case kWKContextMenuItemTagSubstitutionsMenu:
diff --git a/Source/WebKit2/Shared/APIObject.h b/Source/WebKit2/Shared/APIObject.h
index 38155d1..3e124c6 100644
--- a/Source/WebKit2/Shared/APIObject.h
+++ b/Source/WebKit2/Shared/APIObject.h
@@ -31,14 +31,14 @@
#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;
diff --git a/Source/WebKit2/Shared/ChildProcess.cpp b/Source/WebKit2/Shared/ChildProcess.cpp
index b25f51d..d90d447 100644
--- a/Source/WebKit2/Shared/ChildProcess.cpp
+++ b/Source/WebKit2/Shared/ChildProcess.cpp
@@ -163,7 +163,7 @@
stopRunLoop();
}
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
void ChildProcess::platformInitialize()
{
}
diff --git a/Source/WebKit2/Shared/ChildProcess.h b/Source/WebKit2/Shared/ChildProcess.h
index 02a68f8..2c9f43b 100644
--- a/Source/WebKit2/Shared/ChildProcess.h
+++ b/Source/WebKit2/Shared/ChildProcess.h
@@ -65,7 +65,7 @@
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 @@
virtual void stopRunLoop();
-#if PLATFORM(MAC)
+#if USE(APPKIT)
static void stopNSAppRunLoop();
#endif
diff --git a/Source/WebKit2/Shared/CommandLine.h b/Source/WebKit2/Shared/CommandLine.h
index f5955e7..9603515 100644
--- a/Source/WebKit2/Shared/CommandLine.h
+++ b/Source/WebKit2/Shared/CommandLine.h
@@ -37,7 +37,7 @@
class CommandLine {
public:
-#if PLATFORM(MAC)
+#if OS(UNIX)
bool parse(int argc, char** argv);
#endif
String operator[](const String& key) const
diff --git a/Source/WebKit2/Shared/DictionaryPopupInfo.cpp b/Source/WebKit2/Shared/DictionaryPopupInfo.cpp
index e15dae6..2436807 100644
--- a/Source/WebKit2/Shared/DictionaryPopupInfo.cpp
+++ b/Source/WebKit2/Shared/DictionaryPopupInfo.cpp
@@ -28,7 +28,7 @@
#include "WebCoreArgumentCoders.h"
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include "ArgumentCodersCF.h"
#endif
@@ -38,7 +38,7 @@
{
encoder << origin;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
bool hadOptions = options;
encoder << hadOptions;
if (hadOptions)
@@ -50,7 +50,7 @@
{
if (!decoder.decode(result.origin))
return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
bool hadOptions;
if (!decoder.decode(hadOptions))
return false;
diff --git a/Source/WebKit2/Shared/DictionaryPopupInfo.h b/Source/WebKit2/Shared/DictionaryPopupInfo.h
index 7a0aa95..f609276 100644
--- a/Source/WebKit2/Shared/DictionaryPopupInfo.h
+++ b/Source/WebKit2/Shared/DictionaryPopupInfo.h
@@ -28,7 +28,7 @@
#include <WebCore/FloatPoint.h>
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include <wtf/RetainPtr.h>
#endif
@@ -44,7 +44,7 @@
static bool decode(IPC::ArgumentDecoder&, DictionaryPopupInfo&);
WebCore::FloatPoint origin;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
RetainPtr<CFDictionaryRef> options;
#endif
};
diff --git a/Source/WebKit2/Shared/Downloads/Download.h b/Source/WebKit2/Shared/Downloads/Download.h
index d67a04a..3f380f1 100644
--- a/Source/WebKit2/Shared/Downloads/Download.h
+++ b/Source/WebKit2/Shared/Downloads/Download.h
@@ -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 @@
RefPtr<SandboxExtension> m_sandboxExtension;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
RetainPtr<NSURLDownload> m_nsURLDownload;
RetainPtr<WKDownloadAsDelegate> m_delegate;
#endif
diff --git a/Source/WebKit2/Shared/DrawingAreaInfo.h b/Source/WebKit2/Shared/DrawingAreaInfo.h
index 16a3bd5..86877aa 100644
--- a/Source/WebKit2/Shared/DrawingAreaInfo.h
+++ b/Source/WebKit2/Shared/DrawingAreaInfo.h
@@ -29,7 +29,7 @@
namespace WebKit {
enum DrawingAreaType {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#if !PLATFORM(IOS)
DrawingAreaTypeTiledCoreAnimation,
#endif
diff --git a/Source/WebKit2/Shared/FontInfo.cpp b/Source/WebKit2/Shared/FontInfo.cpp
index 7743d72..efd7f36 100644
--- a/Source/WebKit2/Shared/FontInfo.cpp
+++ b/Source/WebKit2/Shared/FontInfo.cpp
@@ -28,7 +28,7 @@
#include "WebCoreArgumentCoders.h"
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include "ArgumentCodersCF.h"
#endif
@@ -36,7 +36,7 @@
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 @@
bool FontInfo::decode(IPC::ArgumentDecoder& decoder, FontInfo& fontInfo)
{
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
bool hasFontAttributeDictionary;
if (!decoder.decode(hasFontAttributeDictionary))
return false;
diff --git a/Source/WebKit2/Shared/FontInfo.h b/Source/WebKit2/Shared/FontInfo.h
index 8f15635..17fd4a1 100644
--- a/Source/WebKit2/Shared/FontInfo.h
+++ b/Source/WebKit2/Shared/FontInfo.h
@@ -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 @@
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, FontInfo&);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
RetainPtr<CFDictionaryRef> fontAttributeDictionary;
#endif
};
diff --git a/Source/WebKit2/Shared/LayerTreeContext.h b/Source/WebKit2/Shared/LayerTreeContext.h
index 51a15ce..62c357c 100644
--- a/Source/WebKit2/Shared/LayerTreeContext.h
+++ b/Source/WebKit2/Shared/LayerTreeContext.h
@@ -52,7 +52,7 @@
bool isEmpty() const;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
uint32_t contextID;
#elif PLATFORM(GTK)
uint64_t windowHandle;
diff --git a/Source/WebKit2/Shared/NativeWebKeyboardEvent.h b/Source/WebKit2/Shared/NativeWebKeyboardEvent.h
index dfc83e3..47c1dfd 100644
--- a/Source/WebKit2/Shared/NativeWebKeyboardEvent.h
+++ b/Source/WebKit2/Shared/NativeWebKeyboardEvent.h
@@ -30,19 +30,24 @@
#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
diff --git a/Source/WebKit2/Shared/NativeWebMouseEvent.h b/Source/WebKit2/Shared/NativeWebMouseEvent.h
index 2b77ffe..231b03f 100644
--- a/Source/WebKit2/Shared/NativeWebMouseEvent.h
+++ b/Source/WebKit2/Shared/NativeWebMouseEvent.h
@@ -28,17 +28,21 @@
#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 {
diff --git a/Source/WebKit2/Shared/NativeWebWheelEvent.h b/Source/WebKit2/Shared/NativeWebWheelEvent.h
index aed301c..46de554 100644
--- a/Source/WebKit2/Shared/NativeWebWheelEvent.h
+++ b/Source/WebKit2/Shared/NativeWebWheelEvent.h
@@ -28,17 +28,21 @@
#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 {
diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm b/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm
similarity index 100%
rename from Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm
rename to Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm
diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
index fda8107..a1f7bf7 100644
--- a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
+++ b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h
@@ -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 @@
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 @@
ChildProcess* m_childProcess;
RefPtr<WorkQueue> m_messageQueue;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
HashSet<String> m_registeredSchemes;
Mutex m_registeredSchemesMutex;
diff --git a/Source/WebKit2/Shared/PlatformPopupMenuData.cpp b/Source/WebKit2/Shared/PlatformPopupMenuData.cpp
index 49da130..b2c75a9 100644
--- a/Source/WebKit2/Shared/PlatformPopupMenuData.cpp
+++ b/Source/WebKit2/Shared/PlatformPopupMenuData.cpp
@@ -36,7 +36,7 @@
void PlatformPopupMenuData::encode(IPC::ArgumentEncoder& encoder) const
{
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
encoder << fontInfo;
encoder << shouldPopOver;
#else
@@ -46,7 +46,7 @@
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))
diff --git a/Source/WebKit2/Shared/PlatformPopupMenuData.h b/Source/WebKit2/Shared/PlatformPopupMenuData.h
index 10207fe..ccb5aee 100644
--- a/Source/WebKit2/Shared/PlatformPopupMenuData.h
+++ b/Source/WebKit2/Shared/PlatformPopupMenuData.h
@@ -43,7 +43,7 @@
void encode(IPC::ArgumentEncoder&) const;
static bool decode(IPC::ArgumentDecoder&, PlatformPopupMenuData&);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
FontInfo fontInfo;
bool shouldPopOver;
#endif
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp b/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
index ec15420..f18848a 100644
--- a/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
+++ b/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
@@ -164,7 +164,7 @@
return ImmutableDictionary::create(std::move(map));
}
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&)
{
}
diff --git a/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h b/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
index bc03029..6232b51 100644
--- a/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
+++ b/Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
@@ -28,7 +28,7 @@
#include <WebCore/PluginData.h>
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include <mach/machine.h>
#endif
@@ -50,7 +50,7 @@
String path;
WebCore::PluginInfo info;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
cpu_type_t pluginArchitecture;
String bundleIdentifier;
String versionString;
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
index a53fdef..bfbdda2 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
@@ -43,7 +43,7 @@
encoder << supportsAsynchronousPluginInitialization;
encoder << minimumLifetime;
encoder << terminationTimeout;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
encoder << acceleratedCompositingPort;
#endif
}
@@ -58,7 +58,7 @@
return false;
if (!decoder.decode(result.terminationTimeout))
return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
if (!decoder.decode(result.acceleratedCompositingPort))
return false;
#endif
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
index e0f9d6b..ac96368 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
@@ -30,7 +30,7 @@
#include "PluginProcessAttributes.h"
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include "MachPort.h"
#endif
@@ -53,7 +53,7 @@
double minimumLifetime;
double terminationTimeout;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
IPC::MachPort acceleratedCompositingPort;
#endif
};
diff --git a/Source/WebKit2/Shared/PrintInfo.h b/Source/WebKit2/Shared/PrintInfo.h
index c037ccf..8be9f8d 100644
--- a/Source/WebKit2/Shared/PrintInfo.h
+++ b/Source/WebKit2/Shared/PrintInfo.h
@@ -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;
diff --git a/Source/WebKit2/Shared/SandboxInitializationParameters.h b/Source/WebKit2/Shared/SandboxInitializationParameters.h
index a6621c5..5c9bbe3 100644
--- a/Source/WebKit2/Shared/SandboxInitializationParameters.h
+++ b/Source/WebKit2/Shared/SandboxInitializationParameters.h
@@ -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 @@
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 @@
#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 @@
#endif
};
-#if !PLATFORM(MAC)
+#if !PLATFORM(COCOA)
SandboxInitializationParameters::SandboxInitializationParameters()
{
}
diff --git a/Source/WebKit2/Shared/TextCheckerState.h b/Source/WebKit2/Shared/TextCheckerState.h
index 0473032..bcc9fec 100644
--- a/Source/WebKit2/Shared/TextCheckerState.h
+++ b/Source/WebKit2/Shared/TextCheckerState.h
@@ -34,7 +34,7 @@
bool isContinuousSpellCheckingEnabled;
bool isGrammarCheckingEnabled;
-#if PLATFORM(MAC)
+#if USE(APPKIT)
bool isAutomaticSpellingCorrectionEnabled;
bool isAutomaticQuoteSubstitutionEnabled;
bool isAutomaticDashSubstitutionEnabled;
diff --git a/Source/WebKit2/Shared/WebArchive.cpp b/Source/WebKit2/Shared/WebArchive.cpp
index 02dec12..0b65abe 100644
--- a/Source/WebKit2/Shared/WebArchive.cpp
+++ b/Source/WebKit2/Shared/WebArchive.cpp
@@ -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 @@
} // namespace WebKit
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
diff --git a/Source/WebKit2/Shared/WebArchive.h b/Source/WebKit2/Shared/WebArchive.h
index daddb87..e6bb64e 100644
--- a/Source/WebKit2/Shared/WebArchive.h
+++ b/Source/WebKit2/Shared/WebArchive.h
@@ -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 @@
} // namespace WebKit
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
#endif // WebArchive_h
diff --git a/Source/WebKit2/Shared/WebArchiveResource.cpp b/Source/WebKit2/Shared/WebArchiveResource.cpp
index c495099..9889f6f 100644
--- a/Source/WebKit2/Shared/WebArchiveResource.cpp
+++ b/Source/WebKit2/Shared/WebArchiveResource.cpp
@@ -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 @@
} // namespace WebKit
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
diff --git a/Source/WebKit2/Shared/WebArchiveResource.h b/Source/WebKit2/Shared/WebArchiveResource.h
index d8c7304..1cc7036 100644
--- a/Source/WebKit2/Shared/WebArchiveResource.h
+++ b/Source/WebKit2/Shared/WebArchiveResource.h
@@ -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 @@
} // namespace WebKit
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
#endif // WebArchiveResource_h
diff --git a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
index 5592cf0..173e3d3 100644
--- a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
@@ -574,7 +574,7 @@
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 @@
bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder& decoder, ResourceResponse& resourceResponse)
{
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
bool hasSerializedWebCoreData;
if (!decoder.decode(hasSerializedWebCoreData))
return false;
diff --git a/Source/WebKit2/Shared/WebCoreArgumentCoders.h b/Source/WebKit2/Shared/WebCoreArgumentCoders.h
index 4a80f29..a4e264f 100644
--- a/Source/WebKit2/Shared/WebCoreArgumentCoders.h
+++ b/Source/WebKit2/Shared/WebCoreArgumentCoders.h
@@ -83,7 +83,7 @@
struct WindowFeatures;
}
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
namespace WebCore {
struct KeypressCommand;
}
@@ -214,7 +214,7 @@
};
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::ResourceError> {
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
static const bool kShouldSerializeWebCoreData = false;
#else
static const bool kShouldSerializeWebCoreData = true;
@@ -256,7 +256,7 @@
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&);
diff --git a/Source/WebKit2/Shared/WebEvent.h b/Source/WebKit2/Shared/WebEvent.h
index b5bbb58..b7a198e 100644
--- a/Source/WebKit2/Shared/WebEvent.h
+++ b/Source/WebKit2/Shared/WebEvent.h
@@ -150,7 +150,7 @@
ScrollByPixelWheelEvent
};
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
enum Phase {
PhaseNone = 0,
PhaseBegan = 1 << 0,
@@ -165,7 +165,7 @@
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 @@
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 @@
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;
diff --git a/Source/WebKit2/Shared/WebEventConversion.cpp b/Source/WebKit2/Shared/WebEventConversion.cpp
index 03fd0ed..9e05656 100644
--- a/Source/WebKit2/Shared/WebEventConversion.cpp
+++ b/Source/WebKit2/Shared/WebEventConversion.cpp
@@ -128,7 +128,7 @@
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();
diff --git a/Source/WebKit2/Shared/WebKit2Initialize.cpp b/Source/WebKit2/Shared/WebKit2Initialize.cpp
index ef3cd94..651d593 100644
--- a/Source/WebKit2/Shared/WebKit2Initialize.cpp
+++ b/Source/WebKit2/Shared/WebKit2Initialize.cpp
@@ -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 @@
void InitializeWebKit2()
{
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
InitWebCoreSystemInterface();
#endif
#if PLATFORM(IOS)
diff --git a/Source/WebKit2/Shared/WebPageCreationParameters.cpp b/Source/WebKit2/Shared/WebPageCreationParameters.cpp
index 0003489..9c9e476 100644
--- a/Source/WebKit2/Shared/WebPageCreationParameters.cpp
+++ b/Source/WebKit2/Shared/WebPageCreationParameters.cpp
@@ -62,7 +62,7 @@
encoder << backgroundExtendsBeyondPage;
encoder.encodeEnum(layerHostingMode);
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
encoder << colorSpace;
#endif
}
@@ -126,7 +126,7 @@
if (!decoder.decodeEnum(parameters.layerHostingMode))
return false;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
if (!decoder.decode(parameters.colorSpace))
return false;
#endif
diff --git a/Source/WebKit2/Shared/WebPageCreationParameters.h b/Source/WebKit2/Shared/WebPageCreationParameters.h
index bdca723..a340251 100644
--- a/Source/WebKit2/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit2/Shared/WebPageCreationParameters.h
@@ -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 @@
LayerHostingMode layerHostingMode;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
ColorSpaceData colorSpace;
#endif
};
diff --git a/Source/WebKit2/Shared/WebPreferencesStore.h b/Source/WebKit2/Shared/WebPreferencesStore.h
index 742d817..5013542 100644
--- a/Source/WebKit2/Shared/WebPreferencesStore.h
+++ b/Source/WebKit2/Shared/WebPreferencesStore.h
@@ -54,7 +54,7 @@
#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 @@
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") \
diff --git a/Source/WebKit2/Shared/WebProcessCreationParameters.cpp b/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
index e80dc9e..92d929f 100644
--- a/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
+++ b/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
@@ -35,7 +35,7 @@
, shouldAlwaysUseComplexTextCodePath(false)
, shouldUseFontSmoothing(true)
, defaultRequestTimeoutInterval(INT_MAX)
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
, nsURLCacheMemoryCapacity(0)
, nsURLCacheDiskCapacity(0)
, shouldForceScreenFontSubstitution(false)
@@ -96,10 +96,10 @@
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 @@
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))
diff --git a/Source/WebKit2/Shared/WebProcessCreationParameters.h b/Source/WebKit2/Shared/WebProcessCreationParameters.h
index de54ff8..1b624ca 100644
--- a/Source/WebKit2/Shared/WebProcessCreationParameters.h
+++ b/Source/WebKit2/Shared/WebProcessCreationParameters.h
@@ -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 @@
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 @@
bool shouldForceScreenFontSubstitution;
bool shouldEnableKerningAndLigaturesByDefault;
bool shouldEnableFTL;
-#endif // PLATFORM(MAC)
+#endif // PLATFORM(COCOA)
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
HashMap<String, bool> notificationPermissions;
diff --git a/Source/WebKit2/Shared/WebWheelEvent.cpp b/Source/WebKit2/Shared/WebWheelEvent.cpp
index fe3b973..d250a14 100644
--- a/Source/WebKit2/Shared/WebWheelEvent.cpp
+++ b/Source/WebKit2/Shared/WebWheelEvent.cpp
@@ -41,7 +41,7 @@
, 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 @@
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 @@
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 @@
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))
diff --git a/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp b/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
index 3f94c1a..9fde197 100644
--- a/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
+++ b/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
@@ -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 @@
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()) {
diff --git a/Source/WebKit2/Shared/mac/PDFKitImports.h b/Source/WebKit2/Shared/mac/PDFKitImports.h
index 5edd032..a1a13d3 100644
--- a/Source/WebKit2/Shared/mac/PDFKitImports.h
+++ b/Source/WebKit2/Shared/mac/PDFKitImports.h
@@ -26,8 +26,6 @@
#ifndef PDFKitImports_h
#define PDFKitImports_h
-#if PLATFORM(MAC)
-
namespace WebKit {
NSString *pdfKitFrameworkPath();
@@ -43,6 +41,4 @@
}
-#endif // PLATFORM(MAC)
-
#endif // PDFKitImports_h
diff --git a/Source/WebKit2/Shared/mac/CommandLineMac.cpp b/Source/WebKit2/Shared/posix/CommandLinePOSIX.cpp
similarity index 93%
rename from Source/WebKit2/Shared/mac/CommandLineMac.cpp
rename to Source/WebKit2/Shared/posix/CommandLinePOSIX.cpp
index 5001981..b9a3539 100644
--- a/Source/WebKit2/Shared/mac/CommandLineMac.cpp
+++ b/Source/WebKit2/Shared/posix/CommandLinePOSIX.cpp
@@ -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))
diff --git a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
index ad14b0c..5e1d3f92 100644
--- a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -201,7 +201,7 @@
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 */; };
@@ -415,7 +415,7 @@
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 */; };
@@ -1870,7 +1870,7 @@
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>"; };
@@ -2103,7 +2103,7 @@
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>"; };
@@ -3816,6 +3816,7 @@
BC111B5A112F628200337BAB /* mac */,
51A8A60D1627F2AC000D90E9 /* Network */,
1AAE058C1279DCD400852418 /* Plugins */,
+ 3709504918A9FAD20087AE5D /* posix */,
0F5947A0187B3B7100437857 /* Scrolling */,
BC64696D11DBE603006455B0 /* APIArray.cpp */,
BC64696E11DBE603006455B0 /* APIArray.h */,
@@ -4127,19 +4128,20 @@
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 */ = {
@@ -4348,6 +4350,14 @@
path = foundation;
sourceTree = "<group>";
};
+ 3709504918A9FAD20087AE5D /* posix */ = {
+ isa = PBXGroup;
+ children = (
+ 1A6F9FB611E1408500DB1371 /* CommandLinePOSIX.cpp */,
+ );
+ path = posix;
+ sourceTree = "<group>";
+ };
37C4C08318149C2A003688B9 /* Cocoa */ = {
isa = PBXGroup;
children = (
@@ -5341,7 +5351,6 @@
9F54F88E16488E87007DF81A /* ChildProcessMac.mm */,
1A2A4AFE158693920090C9E9 /* ColorSpaceData.h */,
1A2A4AFD158693920090C9E9 /* ColorSpaceData.mm */,
- 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */,
CDC3830D1721242D008A2FC3 /* CookieStorageShim.mm */,
CDC3830E1721242D008A2FC3 /* CookieStorageShim.h */,
CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */,
@@ -7662,7 +7671,7 @@
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 */,
@@ -7675,7 +7684,7 @@
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 */,