Title: [230375] trunk
Revision
230375
Author
mcatanz...@igalia.com
Date
2018-04-08 08:55:56 -0700 (Sun, 08 Apr 2018)

Log Message

[WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
https://bugs.webkit.org/show_bug.cgi?id=184381

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

These are unused.

* platform/FileSystem.h:
* platform/glib/FileSystemGlib.cpp:
(WebCore::FileSystem::applicationDirectoryPath): Deleted.
(WebCore::FileSystem::sharedResourcesPath): Deleted.

Modified Paths

Diff

Modified: trunk/ChangeLog (230374 => 230375)


--- trunk/ChangeLog	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/ChangeLog	2018-04-08 15:55:56 UTC (rev 230375)
@@ -1,3 +1,13 @@
+2018-04-08  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
+        https://bugs.webkit.org/show_bug.cgi?id=184381
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+
 2018-04-02  Per Arne Vollan  <pvol...@apple.com>
 
         Remove references to internal version of WebKitQuartzCoreAdditions in CMake files.

Modified: trunk/Source/WebCore/ChangeLog (230374 => 230375)


--- trunk/Source/WebCore/ChangeLog	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/Source/WebCore/ChangeLog	2018-04-08 15:55:56 UTC (rev 230375)
@@ -1,3 +1,17 @@
+2018-04-08  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        [WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
+        https://bugs.webkit.org/show_bug.cgi?id=184381
+
+        Reviewed by Carlos Garcia Campos.
+
+        These are unused.
+
+        * platform/FileSystem.h:
+        * platform/glib/FileSystemGlib.cpp:
+        (WebCore::FileSystem::applicationDirectoryPath): Deleted.
+        (WebCore::FileSystem::sharedResourcesPath): Deleted.
+
 2018-04-07  Daniel Bates  <daba...@apple.com>
 
         Have WorkerScriptLoader::loadAsynchronously() take a FetchOptions

Modified: trunk/Source/WebCore/platform/FileSystem.h (230374 => 230375)


--- trunk/Source/WebCore/platform/FileSystem.h	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/Source/WebCore/platform/FileSystem.h	2018-04-08 15:55:56 UTC (rev 230375)
@@ -175,8 +175,6 @@
 
 #if PLATFORM(GTK) || PLATFORM(WPE)
 String filenameForDisplay(const String&);
-CString applicationDirectoryPath();
-CString sharedResourcesPath();
 #endif
 
 #if PLATFORM(WIN)

Modified: trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp (230374 => 230375)


--- trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp	2018-04-08 15:55:56 UTC (rev 230375)
@@ -255,45 +255,6 @@
     return String::fromUTF8(baseName.get());
 }
 
-CString applicationDirectoryPath()
-{
-    CString path = getCurrentExecutablePath();
-    if (!path.isNull())
-        return path;
-
-    // If the above fails, check the PATH env variable.
-    GUniquePtr<char> currentExePath(g_find_program_in_path(g_get_prgname()));
-    if (!currentExePath.get())
-        return CString();
-
-    GUniquePtr<char> dirname(g_path_get_dirname(currentExePath.get()));
-    return dirname.get();
-}
-
-CString sharedResourcesPath()
-{
-    static CString cachedPath;
-    if (!cachedPath.isNull())
-        return cachedPath;
-
-#if PLATFORM(WPE)
-    GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "wpe", nullptr));
-#elif PLATFORM(GTK)
-#if OS(WINDOWS)
-    HMODULE hmodule = 0;
-    GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, reinterpret_cast<char*>(sharedResourcesPath), &hmodule);
-
-    GUniquePtr<gchar> runtimeDir(g_win32_get_package_installation_directory_of_module(hmodule));
-    GUniquePtr<gchar> dataPath(g_build_filename(runtimeDir.get(), "share", "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL));
-#else
-    GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL));
-#endif
-#endif
-
-    cachedPath = dataPath.get();
-    return cachedPath;
-}
-
 bool getVolumeFreeSpace(const String& path, uint64_t& freeSpace)
 {
     GUniquePtr<gchar> filename = unescapedFilename(path);

Modified: trunk/Source/cmake/OptionsGTK.cmake (230374 => 230375)


--- trunk/Source/cmake/OptionsGTK.cmake	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/Source/cmake/OptionsGTK.cmake	2018-04-08 15:55:56 UTC (rev 230375)
@@ -169,7 +169,6 @@
 
 add_definitions(-DBUILDING_GTK__=1)
 add_definitions(-DGETTEXT_PACKAGE="WebKit2GTK-${WEBKITGTK_API_VERSION}")
-add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
 add_definitions(-DWEBKITGTK_API_VERSION_STRING="${WEBKITGTK_API_VERSION}")
 add_definitions(-DJSC_GLIB_API_ENABLED)
 

Modified: trunk/Source/cmake/OptionsWPE.cmake (230374 => 230375)


--- trunk/Source/cmake/OptionsWPE.cmake	2018-04-08 06:43:24 UTC (rev 230374)
+++ trunk/Source/cmake/OptionsWPE.cmake	2018-04-08 15:55:56 UTC (rev 230375)
@@ -105,7 +105,6 @@
 
 add_definitions(-DBUILDING_WPE__=1)
 add_definitions(-DGETTEXT_PACKAGE="WPE")
-add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
 add_definitions(-DJSC_GLIB_API_ENABLED)
 
 SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to