From 27d93c182c7202c8d2a4ff5c9e05a85c3444cca6 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 10 May 2003 11:15:49 +0000 Subject: [project @ 2003-05-10 11:13:34 by bursa] Partial PNG support. svn path=/import/netsurf/; revision=129 --- render/html.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'render/html.c') diff --git a/render/html.c b/render/html.c index 8b2cd7338..8b572fd24 100644 --- a/render/html.c +++ b/render/html.c @@ -1,5 +1,5 @@ /** - * $Id: html.c,v 1.16 2003/04/25 08:03:15 bursa Exp $ + * $Id: html.c,v 1.17 2003/05/10 11:13:34 bursa Exp $ */ #include @@ -324,7 +324,8 @@ void html_fetch_image(struct content *c, char *url, struct box *box) c->active++; fetchcache(url, c->url, html_image_callback, - fetch_data, 0, 0, 1 << CONTENT_JPEG); + fetch_data, 0, 0, + (1 << CONTENT_JPEG) | (1 << CONTENT_PNG)); } @@ -345,7 +346,7 @@ void html_image_callback(fetchcache_msg msg, struct content *image, box->style->width.width = CSS_WIDTH_LENGTH; box->style->width.value.length.unit = CSS_UNIT_PX; box->style->width.value.length.value = image->width; - box->min_width = box->max_width = image->width; + box->min_width = box->max_width = box->width = image->width; /* invalidate parent min, max widths */ if (box->parent->max_width != UNKNOWN_MAX_WIDTH) { struct box *b = box->parent; @@ -381,6 +382,7 @@ void html_image_callback(fetchcache_msg msg, struct content *image, if (c->active == 1 && c->status == CONTENT_PENDING) { /* all images have arrived */ content_reformat(c, c->available_width, 0); + /*box_dump(c->data.html.layout->children, 0);*/ } c->active--; if (c->active == 0) @@ -413,7 +415,8 @@ void html_revive(struct content *c, unsigned int width, unsigned int height) c->active++; fetchcache(c->data.html.object[i].url, c->url, html_image_callback, - fetch_data, 0, 0, 1 << CONTENT_JPEG); + fetch_data, 0, 0, + (1 << CONTENT_JPEG) | (1 << CONTENT_PNG)); } } -- cgit v1.2.3