Changeset 205485 in webkit
- Timestamp:
- Sep 6, 2016 9:28:03 AM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r205484 r205485 1 2016-09-06 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][Wayland] evince-browser-plugin prevents viewing PDFs 4 https://bugs.webkit.org/show_bug.cgi?id=158697 5 6 Reviewed by Michael Catanzaro. 7 8 Use a different cache file for plugins depending on the current platform display. Plugins can claim to work on 9 X11 but not on Wayland, for example, if they need XEmebed to work. That's the case of the evince browser plugin. 10 11 * UIProcess/Plugins/gtk/PluginInfoCache.cpp: 12 (WebKit::cacheFilenameForCurrentDisplay): 13 (WebKit::PluginInfoCache::PluginInfoCache): 14 1 15 2016-09-06 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebKit2/UIProcess/Plugins/gtk/PluginInfoCache.cpp
r202611 r205485 31 31 #include "NetscapePluginModule.h" 32 32 #include <WebCore/FileSystem.h> 33 #include <WebCore/PlatformDisplay.h> 33 34 #include <wtf/text/CString.h> 34 35 … … 43 44 } 44 45 46 static inline const char* cacheFilenameForCurrentDisplay() 47 { 48 #if PLATFORM(X11) 49 if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) 50 return "plugins-x11"; 51 #endif 52 #if PLATFORM(WAYLAND) 53 if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) 54 return "plugins-wayland"; 55 #endif 56 57 ASSERT_NOT_REACHED(); 58 return "plugins"; 59 } 60 45 61 PluginInfoCache::PluginInfoCache() 46 62 : m_cacheFile(g_key_file_new()) … … 52 68 GUniquePtr<char> cacheDirectory(g_build_filename(g_get_user_cache_dir(), "webkitgtk", nullptr)); 53 69 if (WebCore::makeAllDirectories(cacheDirectory.get())) { 54 m_cachePath.reset(g_build_filename(cacheDirectory.get(), "plugins", nullptr)); 70 // Delete old cache file. 71 GUniquePtr<char> oldCachePath(g_build_filename(cacheDirectory.get(), "plugins", nullptr)); 72 WebCore::deleteFile(WebCore::filenameToString(oldCachePath.get())); 73 74 m_cachePath.reset(g_build_filename(cacheDirectory.get(), cacheFilenameForCurrentDisplay(), nullptr)); 55 75 g_key_file_load_from_file(m_cacheFile.get(), m_cachePath.get(), G_KEY_FILE_NONE, nullptr); 56 76 }
Note: See TracChangeset
for help on using the changeset viewer.