Changeset 230375 in webkit


Ignore:
Timestamp:
Apr 8, 2018 8:55:56 AM (6 years ago)
Author:
Michael Catanzaro
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.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r230188 r230375  
     12018-04-08  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
     4        https://bugs.webkit.org/show_bug.cgi?id=184381
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * Source/cmake/OptionsGTK.cmake:
     9        * Source/cmake/OptionsWPE.cmake:
     10
    1112018-04-02  Per Arne Vollan  <pvollan@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r230374 r230375  
     12018-04-08  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [WPE][GTK] Remove applicationDirectoryPath() and sharedResourcePath()
     4        https://bugs.webkit.org/show_bug.cgi?id=184381
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        These are unused.
     9
     10        * platform/FileSystem.h:
     11        * platform/glib/FileSystemGlib.cpp:
     12        (WebCore::FileSystem::applicationDirectoryPath): Deleted.
     13        (WebCore::FileSystem::sharedResourcesPath): Deleted.
     14
    1152018-04-07  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Source/WebCore/platform/FileSystem.h

    r226349 r230375  
    176176#if PLATFORM(GTK) || PLATFORM(WPE)
    177177String filenameForDisplay(const String&);
    178 CString applicationDirectoryPath();
    179 CString sharedResourcesPath();
    180178#endif
    181179
  • trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp

    r224635 r230375  
    256256}
    257257
    258 CString applicationDirectoryPath()
    259 {
    260     CString path = getCurrentExecutablePath();
    261     if (!path.isNull())
    262         return path;
    263 
    264     // If the above fails, check the PATH env variable.
    265     GUniquePtr<char> currentExePath(g_find_program_in_path(g_get_prgname()));
    266     if (!currentExePath.get())
    267         return CString();
    268 
    269     GUniquePtr<char> dirname(g_path_get_dirname(currentExePath.get()));
    270     return dirname.get();
    271 }
    272 
    273 CString sharedResourcesPath()
    274 {
    275     static CString cachedPath;
    276     if (!cachedPath.isNull())
    277         return cachedPath;
    278 
    279 #if PLATFORM(WPE)
    280     GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "wpe", nullptr));
    281 #elif PLATFORM(GTK)
    282 #if OS(WINDOWS)
    283     HMODULE hmodule = 0;
    284     GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, reinterpret_cast<char*>(sharedResourcesPath), &hmodule);
    285 
    286     GUniquePtr<gchar> runtimeDir(g_win32_get_package_installation_directory_of_module(hmodule));
    287     GUniquePtr<gchar> dataPath(g_build_filename(runtimeDir.get(), "share", "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL));
    288 #else
    289     GUniquePtr<gchar> dataPath(g_build_filename(DATA_DIR, "webkitgtk-" WEBKITGTK_API_VERSION_STRING, NULL));
    290 #endif
    291 #endif
    292 
    293     cachedPath = dataPath.get();
    294     return cachedPath;
    295 }
    296 
    297258bool getVolumeFreeSpace(const String& path, uint64_t& freeSpace)
    298259{
  • trunk/Source/cmake/OptionsGTK.cmake

    r230152 r230375  
    170170add_definitions(-DBUILDING_GTK__=1)
    171171add_definitions(-DGETTEXT_PACKAGE="WebKit2GTK-${WEBKITGTK_API_VERSION}")
    172 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
    173172add_definitions(-DWEBKITGTK_API_VERSION_STRING="${WEBKITGTK_API_VERSION}")
    174173add_definitions(-DJSC_GLIB_API_ENABLED)
  • trunk/Source/cmake/OptionsWPE.cmake

    r229973 r230375  
    106106add_definitions(-DBUILDING_WPE__=1)
    107107add_definitions(-DGETTEXT_PACKAGE="WPE")
    108 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
    109108add_definitions(-DJSC_GLIB_API_ENABLED)
    110109
Note: See TracChangeset for help on using the changeset viewer.