Title: [168553] trunk/Source/WebKit2
Revision
168553
Author
commit-qu...@webkit.org
Date
2014-05-09 14:20:08 -0700 (Fri, 09 May 2014)

Log Message

Expose functions necessary for copying favicon between IconDatabases.
https://bugs.webkit.org/show_bug.cgi?id=132709

Patch by Gordon Sheridan <gordon_sheri...@apple.com> on 2014-05-09
Reviewed by Brady Eidson.

* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseSetIconURLForPageURL):
Add C API wrapper for WebIconDatabase::setIconURLForPageURL().

(WKIconDatabaseCopyIconURLForPageURL):
Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().

* UIProcess/API/C/WKIconDatabase.h:
Added declarations for wrapper functions above.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (168552 => 168553)


--- trunk/Source/WebKit2/ChangeLog	2014-05-09 21:01:28 UTC (rev 168552)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-09 21:20:08 UTC (rev 168553)
@@ -1,3 +1,20 @@
+2014-05-09  Gordon Sheridan  <gordon_sheri...@apple.com>
+
+        Expose functions necessary for copying favicon between IconDatabases.
+        https://bugs.webkit.org/show_bug.cgi?id=132709
+
+        Reviewed by Brady Eidson.
+
+        * UIProcess/API/C/WKIconDatabase.cpp:
+        (WKIconDatabaseSetIconURLForPageURL):
+        Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
+
+        (WKIconDatabaseCopyIconURLForPageURL):
+        Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
+
+        * UIProcess/API/C/WKIconDatabase.h:
+        Added declarations for wrapper functions above.
+
 2014-05-09  Tim Horton  <timothy_hor...@apple.com>
 
         Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp (168552 => 168553)


--- trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp	2014-05-09 21:01:28 UTC (rev 168552)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp	2014-05-09 21:20:08 UTC (rev 168553)
@@ -57,6 +57,18 @@
     toImpl(iconDatabaseRef)->setIconDataForIconURL(toImpl(iconDataRef)->dataReference(), toWTFString(iconURLRef));
 }
 
+void WKIconDatabaseSetIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef iconURLRef, WKURLRef pageURLRef)
+{
+    toImpl(iconDatabaseRef)->setIconURLForPageURL(toWTFString(iconURLRef), toWTFString(pageURLRef));
+}
+
+WKURLRef WKIconDatabaseCopyIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef pageURLRef)
+{
+    String iconURLString;
+    toImpl(iconDatabaseRef)->synchronousIconURLForPageURL(toWTFString(pageURLRef), iconURLString);
+    return toCopiedURLAPI(iconURLString);
+}
+
 void WKIconDatabaseEnableDatabaseCleanup(WKIconDatabaseRef iconDatabaseRef)
 {
     toImpl(iconDatabaseRef)->enableDatabaseCleanup();

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.h (168552 => 168553)


--- trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.h	2014-05-09 21:01:28 UTC (rev 168552)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKIconDatabase.h	2014-05-09 21:20:08 UTC (rev 168553)
@@ -81,6 +81,9 @@
 WK_EXPORT void WKIconDatabaseRetainIconForURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL);
 WK_EXPORT void WKIconDatabaseReleaseIconForURL(WKIconDatabaseRef iconDatabase, WKURLRef pageURL);
 WK_EXPORT void WKIconDatabaseSetIconDataForIconURL(WKIconDatabaseRef iconDatabase, WKDataRef iconData, WKURLRef iconURL);
+WK_EXPORT void WKIconDatabaseSetIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef iconURLRef, WKURLRef pageURLRef);
+WK_EXPORT WKURLRef WKIconDatabaseCopyIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef pageURLRef);
+
 WK_EXPORT void WKIconDatabaseEnableDatabaseCleanup(WKIconDatabaseRef iconDatabase);
 
 WK_EXPORT void WKIconDatabaseRemoveAllIcons(WKIconDatabaseRef iconDatabase);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to