After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648653 - Replace EphyFaviconCache by WebKit's icon database cache
Replace EphyFaviconCache by WebKit's icon database cache
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-25 23:22 UTC by Sergio Villar
Modified: 2012-03-20 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (45.22 KB, patch)
2011-04-25 23:23 UTC, Sergio Villar
none Details | Review
Patch (45.25 KB, patch)
2011-05-04 15:27 UTC, Sergio Villar
none Details | Review
Patch (43.95 KB, patch)
2012-03-07 11:18 UTC, Sergio Villar
reviewed Details | Review
WK favicons (45.03 KB, text/plain)
2012-03-07 18:01 UTC, Sergio Villar
  Details
Replace EphyFaviconCache by WebKit's icon database cache (45.98 KB, patch)
2012-03-08 12:50 UTC, Sergio Villar
none Details | Review
Replace EphyFaviconCache by WebKit's icon database cache (45.93 KB, patch)
2012-03-16 15:43 UTC, Sergio Villar
accepted-commit_now Details | Review

Description Sergio Villar 2011-04-25 23:22:12 UTC
See webkit's https://bugs.webkit.org/show_bug.cgi?id=56200.

Basically WebKit maintains its own favicon database, so instead of using our own better use the one provided by WebKit.

Interestingly in order to use the webkit icon database cache we must ask it to keep the icons we are interested in, otherwise the favicon cache will delete them.
Comment 1 Sergio Villar 2011-04-25 23:23:05 UTC
Created attachment 186627 [details] [review]
Patch
Comment 2 Sergio Villar 2011-05-04 15:27:07 UTC
Created attachment 187201 [details] [review]
Patch

New version updated to the latest changes in the WebKit patch
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2011-10-09 21:11:15 UTC
See https://bugs.webkit.org/show_bug.cgi?id=56200

Xan has patches for the new API.
Comment 4 Sergio Villar 2012-02-22 12:07:31 UTC
(In reply to comment #3)
> See https://bugs.webkit.org/show_bug.cgi?id=56200
> 
> Xan has patches for the new API.

Xan could you post here your patches?
Comment 5 Sergio Villar 2012-03-07 11:18:43 UTC
Created attachment 209148 [details] [review]
Patch

new version against latest wk patch. Created against the history-rewrite branch.
Comment 6 Xan Lopez 2012-03-07 11:56:34 UTC
Review of attachment 209148 [details] [review]:

This looks great in general, I only have a few small comments.

::: embed/ephy-web-view.c
@@ +1521,2 @@
+  uri = webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view));
+  priv->icon = webkit_icon_database_get_icon_pixbuf (webkit_get_icon_database (), uri, 16, 16);

Can we define the 16 x 16 thing somewhere? We are using it in a bunch of separate places (before it was contained in the favicon cache).

Also, we really need to solve the issue of who is caching the scaled version, I think someone has to.

::: src/bookmarks/ephy-bookmark-action.c
@@ +76,1 @@
+	/* TODO: review, where does the icon come from ? */

This just updates the icon URI, the actual favicon is retrieved in the _sync method.

::: src/ephy-completion-model.c
@@ +176,3 @@
+  GdkPixbuf *favicon = webkit_icon_database_get_icon_pixbuf_finish (webkit_get_icon_database (), result, NULL);
+  if (!favicon)
+    goto frees;

Well, probably can just do if (favicon) { and save a goto here :)

@@ +217,3 @@
+  }
+
+  data = g_slice_new(IconLoadData);

space after new.
Comment 7 Sergio Villar 2012-03-07 18:01:14 UTC
Created attachment 209192 [details]
WK favicons
Comment 8 Sergio Villar 2012-03-07 18:02:39 UTC
Comment on attachment 209192 [details]
WK favicons

Sorry wrong patch
Comment 9 Sergio Villar 2012-03-08 12:50:57 UTC
Created attachment 209244 [details] [review]
Replace EphyFaviconCache by WebKit's icon database cache
Comment 10 Sergio Villar 2012-03-16 15:43:18 UTC
Created attachment 209938 [details] [review]
Replace EphyFaviconCache by WebKit's icon database cache
Comment 11 Sergio Villar 2012-03-16 15:43:58 UTC
Comment on attachment 209244 [details] [review]
Replace EphyFaviconCache by WebKit's icon database cache

obsoleting
Comment 12 Xan Lopez 2012-03-20 10:52:21 UTC
Review of attachment 209938 [details] [review]:

I think this is good to go. Remember to remove the references to the files in doc/reference too, otherwise distcheck will break.
Comment 13 Xan Lopez 2012-03-20 11:17:26 UTC
Pushed to master, closing the bug.