diff options
author | James Bursa <james@netsurf-browser.org> | 2003-05-10 11:15:49 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-05-10 11:15:49 +0000 |
commit | 27d93c182c7202c8d2a4ff5c9e05a85c3444cca6 (patch) | |
tree | ed95b0bf286b44e4cd62021490a38a807ff7e4ef /render | |
parent | 0285c2984fc1913d583432716d6fff4f9f291994 (diff) | |
download | netsurf-27d93c182c7202c8d2a4ff5c9e05a85c3444cca6.tar.gz netsurf-27d93c182c7202c8d2a4ff5c9e05a85c3444cca6.tar.bz2 |
[project @ 2003-05-10 11:13:34 by bursa]
Partial PNG support.
svn path=/import/netsurf/; revision=129
Diffstat (limited to 'render')
-rw-r--r-- | render/html.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 <assert.h> @@ -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)); } } |