RESOLVED FIXED 132805
Need function to copy favicon data without image conversion.
https://bugs.webkit.org/show_bug.cgi?id=132805
Summary Need function to copy favicon data without image conversion.
Gordon Sheridan
Reported 2014-05-11 13:01:52 PDT
With WKIconDatabaseSetIconDataForIconURL(), we have a function that can *set* the data for an icon in the destination database. In order to copy a favicon between icon databases, without potential image conversion, we need a function that can get a copy of the data for an icon in the source database.
Attachments
Patch (3.01 KB, patch)
2014-05-11 13:25 PDT, Gordon Sheridan
no flags
Patch (3.01 KB, patch)
2014-05-11 13:50 PDT, Gordon Sheridan
no flags
Patch (3.06 KB, patch)
2014-05-11 15:27 PDT, Gordon Sheridan
no flags
Gordon Sheridan
Comment 1 2014-05-11 13:25:01 PDT
Darin Adler
Comment 2 2014-05-11 13:29:16 PDT
Comment on attachment 231264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231264&action=review > Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp:77 > + WebCore::Image *image = toImpl(iconDatabaseRef)->imageForPageURL(toWTFString(pageURL)); Formatted wrong. Should be Image* rather than Image * with a space. > Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp:79 > + return 0; Should be nullptr. > Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp:81 > + WebCore::SharedBuffer *iconData = image->data(); Formatted wrong. Should be SharedBuffer* rather than SharedBuffer * with a space.
Gordon Sheridan
Comment 3 2014-05-11 13:43:05 PDT
Thanks Darin! I'll update it and post a new patch.
Gordon Sheridan
Comment 4 2014-05-11 13:50:07 PDT
Gordon Sheridan
Comment 5 2014-05-11 15:00:43 PDT
Comment on attachment 231265 [details] Patch I need to update the patch handle when there is no image data.
Gordon Sheridan
Comment 6 2014-05-11 15:27:20 PDT
WebKit Commit Bot
Comment 7 2014-05-11 23:31:09 PDT
Comment on attachment 231268 [details] Patch Clearing flags on attachment: 231268 Committed r168609: <http://trac.webkit.org/changeset/168609>
WebKit Commit Bot
Comment 8 2014-05-11 23:31:12 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 9 2014-05-11 23:39:24 PDT
Comment on attachment 231268 [details] Patch There is one thing wrong with this patch that I did not notice until after it was landed. Generally, API files are not supposed to have substantive code in them. They just have bindings. So this patch should have added a copyIconDataForPageURL member function to WebIconDatabase, rather than putting the code into the bindings file itself. Then the bindings file would just have the binding.
Gordon Sheridan
Comment 10 2014-05-11 23:41:25 PDT
I can submit a new patch. Can this bug be reopened for that, or should I create a new bug?
Darin Adler
Comment 11 2014-05-12 00:53:06 PDT
(In reply to comment #10) > I can submit a new patch. Can this bug be reopened for that, or should I create a new bug? I took care of it and did some other icon database improvements. It’s in bug 132812.
Note You need to log in before you can comment on or make changes to this bug.