Title: [219796] trunk/Source/WebKit
- Revision
- 219796
- Author
- [email protected]
- Date
- 2017-07-23 23:47:25 -0700 (Sun, 23 Jul 2017)
Log Message
Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.
When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
database.
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
string when nullptr is passed.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (219795 => 219796)
--- trunk/Source/WebKit/ChangeLog 2017-07-24 06:05:17 UTC (rev 219795)
+++ trunk/Source/WebKit/ChangeLog 2017-07-24 06:47:25 UTC (rev 219796)
@@ -1,3 +1,16 @@
+2017-07-23 Carlos Garcia Campos <[email protected]>
+
+ Unreviewed. REGRESSION(r219713): [GTK][WPE] Fix default favicon database patch.
+
+ When nullptr is passed to webkit_web_context_set_favicon_database_directory() the default database directory was
+ taken from WebProcessPool::platformDefaultIconDatabasePath(), that has been removed in r219713 without properly
+ replacing it, now it uses an empty string. This causes that the current directory is used to create the favicon
+ database.
+
+ * UIProcess/API/glib/WebKitWebContext.cpp:
+ (webkit_web_context_set_favicon_database_directory): Use the default icon database directory instead of an empty
+ string when nullptr is passed.
+
2017-07-23 Wenson Hsieh <[email protected]>
[iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp (219795 => 219796)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp 2017-07-24 06:05:17 UTC (rev 219795)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp 2017-07-24 06:47:25 UTC (rev 219796)
@@ -878,7 +878,7 @@
*
* Set the directory path to be used to store the favicons database
* for @context on disk. Passing %NULL as @path means using the
- * default directory for the platform (see g_get_user_data_dir()).
+ * default directory for the platform (see g_get_user_cache_dir()).
*
* Calling this method also means enabling the favicons database for
* its use from the applications, so that's why it's expected to be
@@ -892,11 +892,18 @@
WebKitWebContextPrivate* priv = context->priv;
ensureFaviconDatabase(context);
- // Use default if 0 is passed as parameter.
String directoryPath = WebCore::stringFromFileSystemRepresentation(path);
- priv->faviconDatabaseDirectory = directoryPath.isEmpty()
- ? ""
- : directoryPath.utf8();
+ // Use default if nullptr is passed as parameter.
+ if (directoryPath.isEmpty()) {
+#if PLATFORM(GTK)
+ const char* portDirectory = "webkitgtk";
+#elif PLATFORM(WPE)
+ const char* portDirectory = "wpe";
+#endif
+ GUniquePtr<gchar> databaseDirectory(g_build_filename(g_get_user_cache_dir(), portDirectory, "icondatabase", nullptr));
+ directoryPath = WebCore::stringFromFileSystemRepresentation(databaseDirectory.get());
+ }
+ priv->faviconDatabaseDirectory = directoryPath.utf8();
// Build the full path to the icon database file on disk.
GUniquePtr<gchar> faviconDatabasePath(g_build_filename(priv->faviconDatabaseDirectory.data(),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes