From 1f07fc6de5ae4e9999efb1fc1cd0f25a27f1bd64 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 24 Apr 2004 23:42:32 +0000 Subject: [project @ 2004-04-24 23:42:31 by bursa] Replace void pointer in content callbacks with union content_msg_data. Fix animated gif flickering (except for scaled or masked gifs). Add gif to the debug builds. svn path=/import/netsurf/; revision=801 --- render/box.c | 3 ++- render/html.c | 52 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 21 deletions(-) (limited to 'render') diff --git a/render/box.c b/render/box.c index 3e2443ee8..c7edf9e7e 100644 --- a/render/box.c +++ b/render/box.c @@ -765,8 +765,9 @@ struct result box_br(xmlNode *n, struct status *status, } static const content_type image_types[] = { + CONTENT_JPEG, CONTENT_GIF, #ifdef riscos - CONTENT_JPEG, CONTENT_PNG, CONTENT_GIF, CONTENT_SPRITE, CONTENT_DRAW, + CONTENT_PNG, CONTENT_SPRITE, CONTENT_DRAW, #endif CONTENT_UNKNOWN }; diff --git a/render/html.c b/render/html.c index c3a9b87b4..9047e661f 100644 --- a/render/html.c +++ b/render/html.c @@ -33,11 +33,11 @@ static void html_convert_css_callback(content_msg msg, struct content *css, - void *p1, void *p2, const char *error); + void *p1, void *p2, union content_msg_data data); static void html_head(struct content *c, xmlNode *head); static void html_find_stylesheets(struct content *c, xmlNode *head); static void html_object_callback(content_msg msg, struct content *object, - void *p1, void *p2, const char *error); + void *p1, void *p2, union content_msg_data data); static bool html_object_type_permitted(const content_type type, const content_type *permitted_types); @@ -136,6 +136,7 @@ int html_convert(struct content *c, unsigned int width, unsigned int height) { xmlDoc *document; xmlNode *html, *head; + union content_msg_data data; /* finish parsing */ htmlParseChunk(c->data.html.parser, "", 0, 1); @@ -176,7 +177,7 @@ int html_convert(struct content *c, unsigned int width, unsigned int height) /* convert xml tree to box tree */ LOG(("XML to box")); sprintf(c->status_message, messages_get("Processing")); - content_broadcast(c, CONTENT_MSG_STATUS, 0); + content_broadcast(c, CONTENT_MSG_STATUS, data); xml_to_box(html, c); /*box_dump(c->data.html.layout->children, 0);*/ @@ -189,7 +190,7 @@ int html_convert(struct content *c, unsigned int width, unsigned int height) /* layout the box tree */ sprintf(c->status_message, messages_get("Formatting")); - content_broadcast(c, CONTENT_MSG_STATUS, 0); + content_broadcast(c, CONTENT_MSG_STATUS, data); LOG(("Layout document")); layout_document(c->data.html.layout->children, width); /*box_dump(c->data.html.layout->children, 0);*/ @@ -262,6 +263,7 @@ void html_find_stylesheets(struct content *c, xmlNode *head) char *rel, *type, *media, *href, *data, *url; unsigned int i = 2; unsigned int last_active = 0; + union content_msg_data msg_data; /* stylesheet 0 is the base style sheet, stylesheet 1 is any