Current status: not yet made it works. sorry!
build takes more than 10 min, with fearful fan blowing.
editing more and more, getting into maze.
http://stackoverflow.com/questions/2908640/how-to-added-framework-to-cmake
Current status: not yet made it works. sorry!
build takes more than 10 min, with fearful fan blowing.
editing more and more, getting into maze.
http://stackoverflow.com/questions/2908640/how-to-added-framework-to-cmake
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md | |
# /usr/local/Library/Contributions/example-formula.rb | |
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! | |
class Webkitgtk < Formula | |
homepage "" | |
url "http://webkitgtk.org/releases/webkitgtk-2.6.5.tar.xz" | |
version "2.6.5" | |
depends_on "cmake" => :build | |
depends_on "icu4c" => :build | |
depends_on "gettext" => :build | |
depends_on :xcode => :build | |
depends_on "readline" | |
depends_on "webp" | |
depends_on "harfbuzz" | |
depends_on "libsoup" | |
depends_on "gtk+" | |
depends_on "gtk+3" | |
depends_on "enchant" | |
depends_on "gstreamer" | |
depends_on "gst-plugins-base" | |
depends_on "libsecret" | |
depends_on :x11 # if your formula requires any X11/XQuartz components | |
patch :DATA | |
def install | |
# ENV.deparallelize # if your formula fails when building in parallel | |
system "cmake", ".", "-DPORT=GTK", *std_cmake_args | |
system "make", "install" | |
end | |
test do | |
# `test do` will create, run in and delete a temporary directory. | |
# | |
# This test will fail and we won't accept that! It's enough to just replace | |
# "false" with the main program this formula installs, but it'd be nice if you | |
# were more thorough. Run the test with `brew test webkitgtk`. Options passed | |
# to `brew install` such as `--HEAD` also need to be provided to `brew test`. | |
# | |
# The installed folder is not in the path, so use the entire path to any | |
# executables being tested: `system "#{bin}/program", "do", "something"`. | |
system "false" | |
end | |
end | |
__END__ | |
diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake | |
index 0c16b9d..14770ed 100644 | |
--- a/Source/WebKit2/PlatformGTK.cmake | |
+++ b/Source/WebKit2/PlatformGTK.cmake | |
@@ -742,10 +742,6 @@ else () | |
) | |
endif () | |
-# Add required -L flags from ${CMAKE_SHARED_LINKER_FLAGS} for g-ir-scanner | |
-string(REGEX MATCHALL "-L[^ ]*" | |
- INTROSPECTION_ADDITIONAL_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}) | |
- | |
add_custom_command( | |
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir | |
DEPENDS WebKit2 | |
diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h | |
index 34211ce..4e636da 100644 | |
--- a/Source/JavaScriptCore/API/JSBase.h | |
+++ b/Source/JavaScriptCore/API/JSBase.h | |
@@ -152,12 +152,6 @@ JS_EXPORT void JSGarbageCollect(JSContextRef ctx); | |
#endif | |
/* Enable the Objective-C API for platforms with a modern runtime. */ | |
-#if !defined(JSC_OBJC_API_ENABLED) | |
-#ifndef JSC_OBJC_API_AVAILABLE_MAC_OS_X_1080 | |
-#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE))) | |
-#else | |
-#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE))) | |
-#endif | |
-#endif | |
+#define JSC_OBJC_API_ENABLED 0 | |
#endif /* JSBase_h */ | |
diff --git a/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp b/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp | |
index 6c6dba7..d80a8e7 100644 | |
--- a/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp | |
+++ b/Source/JavaScriptCore/runtime/FunctionExecutableDump.cpp | |
@@ -25,6 +25,7 @@ | |
#include "config.h" | |
#include "FunctionExecutableDump.h" | |
+#include "JSCellInlines.h" | |
#include "CodeBlock.h" | |
diff --git a/Source/WebCore/platform/audio/FFTFrame.h b/Source/WebCore/platform/audio/FFTFrame.h | |
index 7a3a145..998b574 100644 | |
--- a/Source/WebCore/platform/audio/FFTFrame.h | |
+++ b/Source/WebCore/platform/audio/FFTFrame.h | |
@@ -90,7 +90,7 @@ private: | |
void interpolateFrequencyComponents(const FFTFrame& frame1, const FFTFrame& frame2, double x); | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !USE(WEBAUDIO_GSTREAMER) | |
DSPSplitComplex& dspSplitComplex() { return m_frame; } | |
DSPSplitComplex dspSplitComplex() const { return m_frame; } | |
diff --git a/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp b/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp | |
index 1182f7a..00ac003 100644 | |
--- a/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp | |
+++ b/Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp | |
@@ -40,11 +40,7 @@ namespace WebCore { | |
#if ENABLE(OPENTYPE_MATH) | |
namespace OpenType { | |
-#if OS(DARWIN) | |
-const FourCharCode MATHTag = 'MATH'; | |
-#else | |
const uint32_t MATHTag = OT_MAKE_TAG('M', 'A', 'T', 'H'); | |
-#endif | |
#pragma pack(1) | |
diff --git a/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp b/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp | |
index bcd14d5..492e0fd 100644 | |
--- a/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp | |
+++ b/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp | |
@@ -35,6 +35,8 @@ | |
#include "StackAlignment.h" | |
#include "VM.h" | |
+#include "JSCellInlines.h" | |
+ | |
namespace JSC { namespace LLInt { | |
static void setFunctionEntrypoint(VM& vm, CodeBlock* codeBlock) | |
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h | |
index 08243cb..42407fb 100644 | |
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h | |
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h | |
@@ -31,7 +31,7 @@ | |
namespace WebCore { | |
-class TextureMapperGLData; | |
+struct TextureMapperGLData; | |
class TextureMapperShaderProgram; | |
class FilterOperation; | |
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt | |
index 59aca72..bb95cb7 100644 | |
--- a/Source/JavaScriptCore/shell/CMakeLists.txt | |
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt | |
@@ -6,6 +6,7 @@ set(JSC_LIBRARIES | |
${CMAKE_DL_LIBS} | |
JavaScriptCore | |
WTF | |
+ readline | |
) | |
diff --git a/Source/WTF/wtf/OSObjectPtr.h b/Source/WTF/wtf/OSObjectPtr.h | |
index 3000d8e..dd03797 100644 | |
--- a/Source/WTF/wtf/OSObjectPtr.h | |
+++ b/Source/WTF/wtf/OSObjectPtr.h | |
@@ -30,7 +30,7 @@ | |
#include <wtf/Assertions.h> | |
#include <wtf/StdLibExtras.h> | |
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 | |
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 || PLATFORM(GTK) | |
#if __has_include(<os/object_private.h>) | |
#include <os/object_private.h> | |
diff --git a/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp b/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp | |
index 1e22301..f7caf54 100644 | |
--- a/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp | |
+++ b/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp | |
@@ -40,6 +40,8 @@ | |
#include <wtf/gobject/GRefPtr.h> | |
#include <wtf/gobject/GUniquePtr.h> | |
+#include <unistd.h> | |
+ | |
using namespace WebCore; | |
namespace WebKit { | |
@@ -59,20 +61,8 @@ static uint64_t getCacheDiskFreeSize(SoupCache* cache) | |
static uint64_t getMemorySize() | |
{ | |
static uint64_t kDefaultMemorySize = 512; | |
-#if !OS(WINDOWS) | |
- long pageSize = sysconf(_SC_PAGESIZE); | |
- if (pageSize == -1) | |
- return kDefaultMemorySize; | |
- | |
- long physPages = sysconf(_SC_PHYS_PAGES); | |
- if (physPages == -1) | |
- return kDefaultMemorySize; | |
- | |
- return ((pageSize / 1024) * physPages) / 1024; | |
-#else | |
// Fallback to default for other platforms. | |
return kDefaultMemorySize; | |
-#endif | |
} | |
void NetworkProcess::userPreferredLanguagesChanged(const Vector<String>& languages) | |
diff --git a/Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp b/Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp | |
index 4105a70..4c85cb0 100644 | |
--- a/Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp | |
+++ b/Source/WebKit2/Platform/IPC/ArgumentDecoder.cpp | |
@@ -47,7 +47,7 @@ ArgumentDecoder::~ArgumentDecoder() | |
{ | |
ASSERT(m_buffer); | |
free(m_buffer); | |
-#if !USE(UNIX_DOMAIN_SOCKETS) | |
+#if !USE(UNIX_DOMAIN_SOCKETS) || OS(DARWIN) | |
// FIXME: We need to dispose of the mach ports in cases of failure. | |
#else | |
Vector<Attachment>::iterator end = m_attachments.end(); | |
diff --git a/Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp b/Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp | |
index c71e1a1..b60a3bd 100644 | |
--- a/Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp | |
+++ b/Source/WebKit2/Platform/IPC/ArgumentEncoder.cpp | |
@@ -68,7 +68,7 @@ ArgumentEncoder::~ArgumentEncoder() | |
if (m_buffer != m_inlineBuffer) | |
freeBuffer(m_buffer, m_bufferCapacity); | |
-#if !USE(UNIX_DOMAIN_SOCKETS) | |
+#if !USE(UNIX_DOMAIN_SOCKETS) || OS(DARWIN) | |
// FIXME: We need to dispose of the attachments in cases of failure. | |
#else | |
for (size_t i = 0; i < m_attachments.size(); ++i) | |
diff --git a/Source/WebKit2/Platform/IPC/Attachment.cpp b/Source/WebKit2/Platform/IPC/Attachment.cpp | |
index 9367b1a..80916f9 100644 | |
--- a/Source/WebKit2/Platform/IPC/Attachment.cpp | |
+++ b/Source/WebKit2/Platform/IPC/Attachment.cpp | |
@@ -36,7 +36,7 @@ Attachment::Attachment() | |
{ | |
} | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
Attachment::Attachment(mach_port_name_t port, mach_msg_type_name_t disposition) | |
: m_type(MachPortType) | |
, m_port(port) | |
diff --git a/Source/WebKit2/Platform/IPC/Attachment.h b/Source/WebKit2/Platform/IPC/Attachment.h | |
index b0f1dce..cdd4cee 100644 | |
--- a/Source/WebKit2/Platform/IPC/Attachment.h | |
+++ b/Source/WebKit2/Platform/IPC/Attachment.h | |
@@ -42,7 +42,7 @@ public: | |
enum Type { | |
Uninitialized, | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
MachPortType, | |
#elif USE(UNIX_DOMAIN_SOCKETS) | |
SocketType, | |
@@ -50,7 +50,7 @@ public: | |
#endif | |
}; | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
Attachment(mach_port_name_t port, mach_msg_type_name_t disposition); | |
#elif USE(UNIX_DOMAIN_SOCKETS) | |
Attachment(int fileDescriptor, size_t); | |
@@ -59,7 +59,7 @@ public: | |
Type type() const { return m_type; } | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
void release(); | |
// MachPortType | |
@@ -81,7 +81,7 @@ public: | |
private: | |
Type m_type; | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
mach_port_name_t m_port; | |
mach_msg_type_name_t m_disposition; | |
#elif USE(UNIX_DOMAIN_SOCKETS) | |
diff --git a/Source/WebKit2/Platform/IPC/Connection.h b/Source/WebKit2/Platform/IPC/Connection.h | |
index 5a0ad96..40e7a6f 100644 | |
--- a/Source/WebKit2/Platform/IPC/Connection.h | |
+++ b/Source/WebKit2/Platform/IPC/Connection.h | |
@@ -99,7 +99,22 @@ public: | |
class WorkQueueMessageReceiver : public MessageReceiver, public ThreadSafeRefCounted<WorkQueueMessageReceiver> { | |
}; | |
-#if OS(DARWIN) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
+ typedef int Identifier; | |
+ static bool identifierIsNull(Identifier identifier) { return !identifier; } | |
+ | |
+ struct SocketPair { | |
+ int client; | |
+ int server; | |
+ }; | |
+ | |
+ enum ConnectionOptions { | |
+ SetCloexecOnClient = 1 << 0, | |
+ SetCloexecOnServer = 1 << 1, | |
+ }; | |
+ | |
+ static Connection::SocketPair createPlatformConnection(unsigned options = SetCloexecOnClient | SetCloexecOnServer); | |
+#elif OS(DARWIN) | |
struct Identifier { | |
Identifier() | |
: port(MACH_PORT_NULL) | |
@@ -123,21 +138,6 @@ public: | |
static bool identifierIsNull(Identifier identifier) { return identifier.port == MACH_PORT_NULL; } | |
xpc_connection_t xpcConnection() { return m_xpcConnection.get(); } | |
bool getAuditToken(audit_token_t&); | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
- typedef int Identifier; | |
- static bool identifierIsNull(Identifier identifier) { return !identifier; } | |
- | |
- struct SocketPair { | |
- int client; | |
- int server; | |
- }; | |
- | |
- enum ConnectionOptions { | |
- SetCloexecOnClient = 1 << 0, | |
- SetCloexecOnServer = 1 << 1, | |
- }; | |
- | |
- static Connection::SocketPair createPlatformConnection(unsigned options = SetCloexecOnClient | SetCloexecOnServer); | |
#endif | |
static PassRefPtr<Connection> createServerConnection(Identifier, Client*, WTF::RunLoop& clientRunLoop); | |
@@ -300,7 +300,17 @@ private: | |
typedef HashMap<uint64_t, SecondaryThreadPendingSyncReply*> SecondaryThreadPendingSyncReplyMap; | |
SecondaryThreadPendingSyncReplyMap m_secondaryThreadPendingSyncReplyMap; | |
-#if OS(DARWIN) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
+ // Called on the connection queue. | |
+ void readyReadHandler(); | |
+ bool processMessage(); | |
+ | |
+ Vector<uint8_t> m_readBuffer; | |
+ size_t m_readBufferSize; | |
+ Vector<int> m_fileDescriptors; | |
+ size_t m_fileDescriptorsSize; | |
+ int m_socketDescriptor; | |
+#elif OS(DARWIN) | |
// Called on the connection queue. | |
void receiveSourceEventHandler(); | |
void initializeDeadNameSource(); | |
@@ -322,16 +332,6 @@ private: | |
OSObjectPtr<xpc_connection_t> m_xpcConnection; | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
- // Called on the connection queue. | |
- void readyReadHandler(); | |
- bool processMessage(); | |
- | |
- Vector<uint8_t> m_readBuffer; | |
- size_t m_readBufferSize; | |
- Vector<int> m_fileDescriptors; | |
- size_t m_fileDescriptorsSize; | |
- int m_socketDescriptor; | |
#endif | |
}; | |
diff --git a/Source/WebKit2/Platform/SharedMemory.h b/Source/WebKit2/Platform/SharedMemory.h | |
index 9e25d08..5111c9c 100644 | |
--- a/Source/WebKit2/Platform/SharedMemory.h | |
+++ b/Source/WebKit2/Platform/SharedMemory.h | |
@@ -68,10 +68,10 @@ public: | |
#endif | |
private: | |
friend class SharedMemory; | |
-#if OS(DARWIN) | |
- mutable mach_port_t m_port; | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
mutable int m_fileDescriptor; | |
+#elif OS(DARWIN) | |
+ mutable mach_port_t m_port; | |
#endif | |
size_t m_size; | |
}; | |
@@ -104,10 +104,10 @@ private: | |
void* m_data; | |
bool m_shouldVMDeallocateData; | |
-#if OS(DARWIN) | |
- mach_port_t m_port; | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
int m_fileDescriptor; | |
+#elif OS(DARWIN) | |
+ mach_port_t m_port; | |
#endif | |
}; | |
diff --git a/Source/WebKit2/Platform/WorkQueue.h b/Source/WebKit2/Platform/WorkQueue.h | |
index 04d2ae5..00ab760 100644 | |
--- a/Source/WebKit2/Platform/WorkQueue.h | |
+++ b/Source/WebKit2/Platform/WorkQueue.h | |
@@ -67,11 +67,11 @@ public: | |
void dispatch(std::function<void ()>); | |
void dispatchAfter(std::chrono::nanoseconds, std::function<void ()>); | |
-#if OS(DARWIN) | |
- dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; } | |
-#elif PLATFORM(GTK) | |
+#if PLATFORM(GTK) | |
void registerSocketEventHandler(int, std::function<void ()>, std::function<void ()>); | |
void unregisterSocketEventHandler(int); | |
+#elif OS(DARWIN) | |
+ dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; } | |
#elif PLATFORM(EFL) | |
void registerSocketEventHandler(int, std::function<void ()>); | |
void unregisterSocketEventHandler(int); | |
@@ -83,10 +83,7 @@ private: | |
void platformInitialize(const char* name, QOS); | |
void platformInvalidate(); | |
-#if OS(DARWIN) | |
- static void executeFunction(void*); | |
- dispatch_queue_t m_dispatchQueue; | |
-#elif PLATFORM(GTK) | |
+#if PLATFORM(GTK) | |
static void startWorkQueueThread(WorkQueue*); | |
void workQueueThreadBody(); | |
@@ -95,6 +92,9 @@ private: | |
Mutex m_eventLoopLock; | |
GRefPtr<GMainLoop> m_eventLoop; | |
GMainLoopSource m_socketEventSource; | |
+#elif OS(DARWIN) | |
+ static void executeFunction(void*); | |
+ dispatch_queue_t m_dispatchQueue; | |
#elif PLATFORM(EFL) | |
RefPtr<DispatchQueue> m_dispatchQueue; | |
#endif | |
diff --git a/Source/WebKit2/Shared/API/c/WKBase.h b/Source/WebKit2/Shared/API/c/WKBase.h | |
index 8d1e965..ba4118f 100644 | |
--- a/Source/WebKit2/Shared/API/c/WKBase.h | |
+++ b/Source/WebKit2/Shared/API/c/WKBase.h | |
@@ -42,7 +42,7 @@ | |
#include <WebKit/WKBaseEfl.h> | |
#endif | |
-#if defined(__APPLE__) | |
+#if defined(__APPLE__) && !defined(BUILDING_GTK__) | |
#include <WebKit/WKBaseMac.h> | |
#endif | |
diff --git a/Source/WebKit2/Shared/NativeWebKeyboardEvent.h b/Source/WebKit2/Shared/NativeWebKeyboardEvent.h | |
index 2773170..e5f74ae 100644 | |
--- a/Source/WebKit2/Shared/NativeWebKeyboardEvent.h | |
+++ b/Source/WebKit2/Shared/NativeWebKeyboardEvent.h | |
@@ -59,11 +59,11 @@ namespace WebKit { | |
class NativeWebKeyboardEvent : public WebKeyboardEvent { | |
public: | |
-#if USE(APPKIT) | |
- NativeWebKeyboardEvent(NSEvent *, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&); | |
-#elif PLATFORM(GTK) | |
+#if PLATFORM(GTK) | |
NativeWebKeyboardEvent(const NativeWebKeyboardEvent&); | |
NativeWebKeyboardEvent(GdkEvent*, const WebCore::CompositionResults&, WebCore::GtkInputMethodFilter::EventFakedForComposition); | |
+#elif USE(APPKIT) | |
+ NativeWebKeyboardEvent(NSEvent *, bool handledByInputMethod, const Vector<WebCore::KeypressCommand>&); | |
#elif PLATFORM(EFL) | |
NativeWebKeyboardEvent(const Evas_Event_Key_Down*, bool); | |
NativeWebKeyboardEvent(const Evas_Event_Key_Up*); | |
@@ -71,12 +71,12 @@ public: | |
NativeWebKeyboardEvent(WebIOSEvent *); | |
#endif | |
-#if USE(APPKIT) | |
- NSEvent *nativeEvent() const { return m_nativeEvent.get(); } | |
-#elif PLATFORM(GTK) | |
+#if PLATFORM(GTK) | |
GdkEvent* nativeEvent() const { return m_nativeEvent.get(); } | |
const WebCore::CompositionResults& compositionResults() const { return m_compositionResults; } | |
bool isFakeEventForComposition() const { return m_fakeEventForComposition; } | |
+#elif USE(APPKIT) | |
+ NSEvent *nativeEvent() const { return m_nativeEvent.get(); } | |
#elif PLATFORM(EFL) | |
const void* nativeEvent() const { return m_nativeEvent; } | |
bool isFiltered() const { return m_isFiltered; } | |
diff --git a/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h b/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h | |
index 3495826..cf4a1f8 100644 | |
--- a/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h | |
+++ b/Source/WebKit2/UIProcess/API/C/WKNativeEvent.h | |
@@ -34,7 +34,10 @@ | |
extern "C" { | |
#endif | |
-#if defined(__APPLE__) && !TARGET_OS_IPHONE | |
+#if defined(BUILDING_GTK__) | |
+typedef union _GdkEvent GdkEvent; | |
+typedef const GdkEvent* WKNativeEventPtr; | |
+#elif defined(__APPLE__) && !TARGET_OS_IPHONE | |
#ifdef __OBJC__ | |
@class NSEvent; | |
#elif __cplusplus | |
@@ -43,9 +46,6 @@ class NSEvent; | |
struct NSEvent; | |
#endif | |
typedef NSEvent *WKNativeEventPtr; | |
-#elif defined(BUILDING_GTK__) | |
-typedef union _GdkEvent GdkEvent; | |
-typedef const GdkEvent* WKNativeEventPtr; | |
#else | |
typedef const void* WKNativeEventPtr; | |
#endif | |
diff --git a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp | |
index f25fe61..0087bb3 100644 | |
--- a/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp | |
+++ b/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp | |
@@ -54,7 +54,7 @@ void ProcessLauncher::didFinishLaunchingProcess(PlatformProcessIdentifier proces | |
if (!m_client) { | |
// FIXME: Make Identifier a move-only object and release port rights/connections in the destructor. | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !USE(UNIX_DOMAIN_SOCKETS) | |
if (identifier.port) | |
mach_port_mod_refs(mach_task_self(), identifier.port, MACH_PORT_RIGHT_RECEIVE, -1); | |
#endif | |
diff --git a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp | |
index e6d069d..28a0147 100644 | |
--- a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp | |
+++ b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp | |
@@ -163,10 +163,10 @@ void NetworkProcessProxy::didCreateNetworkConnectionToWebProcess(const IPC::Atta | |
// Grab the first pending connection reply. | |
RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst(); | |
-#if OS(DARWIN) | |
- reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND)); | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
reply->send(connectionIdentifier); | |
+#elif OS(DARWIN) | |
+ reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND)); | |
#else | |
notImplemented(); | |
#endif | |
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp | |
index 03b0354..f5ae43b 100644 | |
--- a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp | |
+++ b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp | |
@@ -39,7 +39,7 @@ | |
#include <WebCore/NotImplemented.h> | |
#include <wtf/RunLoop.h> | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
#include "MachPort.h" | |
#endif | |
@@ -241,10 +241,10 @@ void PluginProcessProxy::didCreateWebProcessConnection(const IPC::Attachment& co | |
// Grab the first pending connection reply. | |
RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst(); | |
-#if OS(DARWIN) | |
- reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND), supportsAsynchronousPluginInitialization); | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
reply->send(connectionIdentifier, supportsAsynchronousPluginInitialization); | |
+#elif OS(DARWIN) | |
+ reply->send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND), supportsAsynchronousPluginInitialization); | |
#else | |
notImplemented(); | |
#endif | |
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp b/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp | |
index d8bb990..e64987c 100644 | |
--- a/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp | |
+++ b/Source/WebKit2/WebProcess/Plugins/PluginProcessConnectionManager.cpp | |
@@ -36,7 +36,7 @@ | |
#include "WebProcess.h" | |
#include "WebProcessProxyMessages.h" | |
-#if OS(DARWIN) | |
+#if OS(DARWIN) && !defined(BUILDING_GTK__) | |
#include "MachPort.h" | |
#endif | |
@@ -74,14 +74,14 @@ PluginProcessConnection* PluginProcessConnectionManager::getPluginProcessConnect | |
Messages::WebProcessProxy::GetPluginProcessConnection::Reply(encodedConnectionIdentifier, supportsAsynchronousInitialization), 0)) | |
return 0; | |
-#if OS(DARWIN) | |
- IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port()); | |
- if (IPC::Connection::identifierIsNull(connectionIdentifier)) | |
- return 0; | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.fileDescriptor(); | |
if (connectionIdentifier == -1) | |
return 0; | |
+#elif OS(DARWIN) | |
+ IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port()); | |
+ if (IPC::Connection::identifierIsNull(connectionIdentifier)) | |
+ return 0; | |
#endif | |
RefPtr<PluginProcessConnection> pluginProcessConnection = PluginProcessConnection::create(this, pluginProcessToken, connectionIdentifier, supportsAsynchronousInitialization); | |
diff --git a/Source/WebKit2/WebProcess/WebProcess.cpp b/Source/WebKit2/WebProcess/WebProcess.cpp | |
index 20a30ae..93ef4ef 100644 | |
--- a/Source/WebKit2/WebProcess/WebProcess.cpp | |
+++ b/Source/WebKit2/WebProcess/WebProcess.cpp | |
@@ -395,10 +395,10 @@ void WebProcess::ensureNetworkProcessConnection() | |
Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0)) | |
return; | |
-#if OS(DARWIN) | |
- IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port()); | |
-#elif USE(UNIX_DOMAIN_SOCKETS) | |
+#if USE(UNIX_DOMAIN_SOCKETS) | |
IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor(); | |
+#elif OS(DARWIN) | |
+ IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port()); | |
#else | |
ASSERT_NOT_REACHED(); | |
#endif | |
diff --git a/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp b/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp | |
index 340e600..9b1003b 100644 | |
--- a/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp | |
+++ b/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp | |
@@ -65,20 +65,8 @@ static uint64_t getCacheDiskFreeSize(SoupCache* cache) | |
static uint64_t getMemorySize() | |
{ | |
static uint64_t kDefaultMemorySize = 512; | |
-#if !OS(WINDOWS) | |
- long pageSize = sysconf(_SC_PAGESIZE); | |
- if (pageSize == -1) | |
- return kDefaultMemorySize; | |
- | |
- long physPages = sysconf(_SC_PHYS_PAGES); | |
- if (physPages == -1) | |
- return kDefaultMemorySize; | |
- | |
- return ((pageSize / 1024LL) * physPages) / 1024LL; | |
-#else | |
// Fallback to default for other platforms. | |
return kDefaultMemorySize; | |
-#endif | |
} | |
void WebProcess::platformSetCacheModel(CacheModel cacheModel) | |
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake | |
index 536db35..23a528a 100644 | |
--- a/Source/cmake/OptionsGTK.cmake | |
+++ b/Source/cmake/OptionsGTK.cmake | |
@@ -98,7 +98,9 @@ if (DEVELOPER_MODE) | |
else () | |
set(ENABLE_TOOLS OFF) | |
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS OFF) | |
- set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter") | |
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux") | |
+ set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter") | |
+ endif () | |
endif () | |
if (CMAKE_SYSTEM_NAME MATCHES "Linux") | |
@@ -364,10 +366,12 @@ endmacro() | |
# We add --whole-archive to all libraries manually to prevent the linker from trimming | |
# symbols that we actually need later. | |
macro(ADD_WHOLE_ARCHIVE_TO_LIBRARIES _list_name) | |
- foreach (library IN LISTS ${_list_name}) | |
- list(APPEND ${_list_name}_TMP -Wl,--whole-archive ${library} -Wl,--no-whole-archive) | |
- endforeach () | |
- set(${_list_name} "${${_list_name}_TMP}") | |
+ if (CMAKE_COMPILER_IS_GNUCXX) | |
+ foreach (library IN LISTS ${_list_name}) | |
+ list(APPEND ${_list_name}_TMP -Wl,--whole-archive ${library} -Wl,--no-whole-archive) | |
+ endforeach () | |
+ set(${_list_name} "${${_list_name}_TMP}") | |
+ endif () | |
endmacro() | |
if (CMAKE_MAJOR_VERSION LESS 3) |