summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/browser.c3
-rw-r--r--gtk/scaffolding.c6
-rw-r--r--image/ico.c7
3 files changed, 14 insertions, 2 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 29359593e..b74a27d89 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -906,6 +906,9 @@ static nserror browser_window_favicon_callback(hlcache_handle *c,
bw->current_favicon = c;
bw->loading_favicon = NULL;
+ LOG(("Content ended up with mime type of '%s'",
+ lwc_string_data((content_get_mime_type(c)))));
+
/* content_get_bitmap on the hlcache_handle should give
* us the favicon bitmap at this point
*/
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index b9a4b0909..a602cd54f 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -2006,8 +2006,10 @@ void gui_window_set_icon(struct gui_window *_g, hlcache_handle *icon)
if (icon_bitmap != NULL) {
GdkPixbuf *pb = gtk_bitmap_get_primary(icon_bitmap);
- if (pb != NULL && gdk_pixbuf_get_width(pb) > 0 &&
- gdk_pixbuf_get_height(pb) > 0) {
+
+ if ((pb != NULL) &&
+ (gdk_pixbuf_get_width(pb) > 0) &&
+ (gdk_pixbuf_get_height(pb) > 0)) {
pb = gdk_pixbuf_scale_simple(pb, 16, 16, GDK_INTERP_HYPER);
iconImage = GTK_IMAGE(gtk_image_new_from_pixbuf(pb));
}
diff --git a/image/ico.c b/image/ico.c
index 6a8da57ea..7b76ca447 100644
--- a/image/ico.c
+++ b/image/ico.c
@@ -215,6 +215,13 @@ static nserror nsico_clone(const struct content *old, struct content **newc)
static void *nsico_get_internal(const struct content *c, void *context)
{
nsico_content *ico = (nsico_content *) c;
+ struct bmp_image *bmp = ico_find(ico->ico, 255, 255);
+
+ if (!bmp->decoded)
+ if (bmp_decode(bmp) != BMP_OK)
+ return NULL;
+
+ ico->bitmap = bmp->bitmap;
return ico->bitmap;
}