RESOLVED FIXED132709
Expose functions necessary for copying favicon between IconDatabases.
https://bugs.webkit.org/show_bug.cgi?id=132709
Summary Expose functions necessary for copying favicon between IconDatabases.
Gordon Sheridan
Reported 2014-05-08 15:09:02 PDT
In order to copy a favicon between icon databases, we need to surface WebIconDatabase::setIconURLForPageURL() and WebIconDatabase::synchronousIconURLForPageURL().
Attachments
Patch (3.29 KB, patch)
2014-05-08 15:29 PDT, Gordon Sheridan
no flags
Patch (3.27 KB, patch)
2014-05-08 21:02 PDT, Gordon Sheridan
no flags
Gordon Sheridan
Comment 1 2014-05-08 15:29:05 PDT
Jessie Berlin
Comment 2 2014-05-08 18:55:41 PDT
Jessie Berlin
Comment 3 2014-05-08 20:17:58 PDT
Comment on attachment 231104 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231104&action=review > Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp:65 > +WKURLRef WKIconDatabaseSynchronousIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef pageURLRef) This should be something like WKIconDatabaseSynchronousCopyIconURLForPageURL since it returns a copy. > Source/WebKit2/UIProcess/API/C/WKIconDatabase.h:84 > +WK_EXPORT void WKIconDatabaseSetIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef iconURLRef, WKURLRef pageURLRef); Is there a reason you called out "ForPageURL"? The other functions are just "ForURL". > Source/WebKit2/UIProcess/API/C/WKIconDatabase.h:85 > +WK_EXPORT WKURLRef WKIconDatabaseSynchronousIconURLForPageURL(WKIconDatabaseRef iconDatabaseRef, WKURLRef pageURLRef); Is it important and/or right for it to have "Synchronous" in the title? It seems like that should be more of a comment, or just entirely be implied by the fact that it returns the WKURLRef. I don't see any of our other WK2 C API doing this.
Gordon Sheridan
Comment 4 2014-05-08 21:02:40 PDT
Gordon Sheridan
Comment 5 2014-05-08 21:10:36 PDT
Jessie, I updated the patch to incorporate your suggestion to replace 'Synchronous' with 'Copy' in WKIconDatabaseSynchronousIconURLForPageURL(). I'm keeping the 'PageURL' portion instead of condensing it to just 'URL' because there are two URLs in these parameter lists, it matches the underlying method names these are wrapping, and there seemed to be a precedent of using 'PageURL' in two of the IconDatabase client callbacks (WKIconDatabaseDidChangeIconForPageURLCallback and WKIconDatabaseIconDataReadyForPageURLCallback). That said, I'm fine with changing them to whatever the WebKit folks want.
Brady Eidson
Comment 6 2014-05-09 13:49:40 PDT
Comment on attachment 231128 [details] Patch These names are fine.
WebKit Commit Bot
Comment 7 2014-05-09 14:20:41 PDT
Comment on attachment 231128 [details] Patch Clearing flags on attachment: 231128 Committed r168553: <http://trac.webkit.org/changeset/168553>
WebKit Commit Bot
Comment 8 2014-05-09 14:20:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.