GNOME Bugzilla – Bug 672525
history-window: favicon not loaded for newly visited hosts
Last modified: 2012-03-27 09:47:51 UTC
If you visit a page in a new host (www.gnome.org for instance) for the first time while the history window is open, the host is added to the "Sites" view but the favicon is not loaded. This happens because the page is added to the history before the favicon is downloaded by webkit, so by the time this is requested to the icon database this can't find it yet. A potential solution would be to listen the "icon-loaded" favicon database signal, but this might have some performance implications.
Created attachment 210240 [details] [review] ephy-hosts-store: listen to favicon changes in the wk database
Review of attachment 210240 [details] [review]: ::: lib/widgets/ephy-hosts-store.c @@ +62,3 @@ + } else if (cmp > 0) + break; + } while (gtk_tree_model_iter_next (model, &iter)); Nitpick, I think this would be cleaner as a while (valid && !found) { loop, with valid coming from get_iter_first and iter_next and found being the string comparison (and of course you set the favicon if found is TRUE...). Looks good otherwise.
Created attachment 210623 [details] [review] ephy-hosts-store: listen to favicon changes in the wk database The comparison is also used to determine whether there's any point in continuing with the linear search. I applied your suggestions with a few changes to make this more clear.
Created attachment 210627 [details] [review] ephy-hosts-store: listen to favicon changes in the wk database This adds a small optimization to avoid traversing the list for each icon coming from the database and to do it only for hosts.
Review of attachment 210627 [details] [review]: Looks good.