[GTK][EFL] Move WK2 platform code to a common place
authorcsaavedra@igalia.com <csaavedra@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2016 19:39:35 +0000 (19:39 +0000)
committercsaavedra@igalia.com <csaavedra@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2016 19:39:35 +0000 (19:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157069

Reviewed by Carlos Garcia Campos.

Logging implementation can be shared between EFL and GTK, so move it to unix.
The GTK Module implementation doesn't depend on GTK anyhow so move it to glib.

* Platform/efl/LoggingEfl.cpp: Removed.
(WebKit::logLevelString): Deleted.
* Platform/glib/ModuleGlib.cpp: Renamed from Source/WebKit2/Platform/gtk/ModuleGtk.cpp.
(WebKit::Module::load):
(WebKit::Module::unload):
(WebKit::Module::platformFunctionPointer):
* Platform/gtk/LoggingGtk.cpp:
(WebKit::logLevelString): Deleted.
* Platform/gtk/ModuleGtk.cpp:
(WebKit::Module::load): Deleted.
(WebKit::Module::unload): Deleted.
(WebKit::Module::platformFunctionPointer): Deleted.
* Platform/unix/LoggingUnix.cpp: Renamed from Source/WebKit2/Platform/gtk/LoggingGtk.cpp.
(WebKit::logLevelString):
* PlatformEfl.cmake: Update.
* PlatformGTK.cmake: Update

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

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/efl/LoggingEfl.cpp [deleted file]
Source/WebKit2/Platform/glib/ModuleGlib.cpp [moved from Source/WebKit2/Platform/gtk/ModuleGtk.cpp with 100% similarity]
Source/WebKit2/Platform/unix/LoggingUnix.cpp [moved from Source/WebKit2/Platform/gtk/LoggingGtk.cpp with 96% similarity]
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformGTK.cmake

index 7d1c53c..81131c3 100644 (file)
@@ -1,3 +1,30 @@
+2016-04-27  Claudio Saavedra  <csaavedra@igalia.com>
+
+        [GTK][EFL] Move WK2 platform code to a common place
+        https://bugs.webkit.org/show_bug.cgi?id=157069
+
+        Reviewed by Carlos Garcia Campos.
+
+        Logging implementation can be shared between EFL and GTK, so move it to unix.
+        The GTK Module implementation doesn't depend on GTK anyhow so move it to glib.
+
+        * Platform/efl/LoggingEfl.cpp: Removed.
+        (WebKit::logLevelString): Deleted.
+        * Platform/glib/ModuleGlib.cpp: Renamed from Source/WebKit2/Platform/gtk/ModuleGtk.cpp.
+        (WebKit::Module::load):
+        (WebKit::Module::unload):
+        (WebKit::Module::platformFunctionPointer):
+        * Platform/gtk/LoggingGtk.cpp:
+        (WebKit::logLevelString): Deleted.
+        * Platform/gtk/ModuleGtk.cpp:
+        (WebKit::Module::load): Deleted.
+        (WebKit::Module::unload): Deleted.
+        (WebKit::Module::platformFunctionPointer): Deleted.
+        * Platform/unix/LoggingUnix.cpp: Renamed from Source/WebKit2/Platform/gtk/LoggingGtk.cpp.
+        (WebKit::logLevelString):
+        * PlatformEfl.cmake: Update.
+        * PlatformGTK.cmake: Update
+
 2016-04-27  Alex Christensen  <achristensen@webkit.org>
 
         Fix assertion when downloading with NSURLSession after r198955
diff --git a/Source/WebKit2/Platform/efl/LoggingEfl.cpp b/Source/WebKit2/Platform/efl/LoggingEfl.cpp
deleted file mode 100644 (file)
index af64be5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2012 Samsung Electronics. All rights reserved.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "Logging.h"
-
-#if !LOG_DISABLED
-
-namespace WebKit {
-
-String logLevelString()
-{
-    return getenv("WEBKIT_DEBUG");
-}
-
-} // namespace WebKit
-
-#endif // !LOG_DISABLED
similarity index 96%
rename from Source/WebKit2/Platform/gtk/LoggingGtk.cpp
rename to Source/WebKit2/Platform/unix/LoggingUnix.cpp
index 44e5b11..6a55d40 100644 (file)
 #include "config.h"
 #include "Logging.h"
 
-#include <glib.h>
-
 namespace WebKit {
 
 #if !LOG_DISABLED
 
 String logLevelString()
 {
-    return g_getenv("WEBKIT_DEBUG");
+    return getenv("WEBKIT_DEBUG");
 }
 
 #endif // !LOG_DISABLED
index 61d66ea..0d6a99f 100644 (file)
@@ -16,9 +16,9 @@ list(APPEND WebKit2_SOURCES
     Platform/IPC/unix/AttachmentUnix.cpp
     Platform/IPC/unix/ConnectionUnix.cpp
 
-    Platform/efl/LoggingEfl.cpp
     Platform/efl/ModuleEfl.cpp
 
+    Platform/unix/LoggingUnix.cpp
     Platform/unix/SharedMemoryUnix.cpp
 
     PluginProcess/unix/PluginControllerProxyUnix.cpp
index bfadb64..2d81b37 100644 (file)
@@ -46,9 +46,9 @@ list(APPEND WebKit2_SOURCES
     Platform/IPC/unix/AttachmentUnix.cpp
     Platform/IPC/unix/ConnectionUnix.cpp
 
-    Platform/gtk/LoggingGtk.cpp
-    Platform/gtk/ModuleGtk.cpp
+    Platform/glib/ModuleGlib.cpp
 
+    Platform/unix/LoggingUnix.cpp
     Platform/unix/SharedMemoryUnix.cpp
 
     PluginProcess/unix/PluginControllerProxyUnix.cpp
@@ -728,9 +728,9 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
         Platform/IPC/unix/AttachmentUnix.cpp
         Platform/IPC/unix/ConnectionUnix.cpp
 
-        Platform/gtk/LoggingGtk.cpp
-        Platform/gtk/ModuleGtk.cpp
+        Platform/glib/ModuleGlib.cpp
 
+        Platform/unix/LoggingUnix.cpp
         Platform/unix/SharedMemoryUnix.cpp
 
         PluginProcess/PluginControllerProxy.cpp