From ddeadd1c02880367ad786b113d352a519f45ec73 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 23 Jul 2009 23:05:34 +0000 Subject: Merge LibCSS port to trunk. svn path=/trunk/netsurf/; revision=8752 --- content/content.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index bda652fad..2b4499a29 100644 --- a/content/content.c +++ b/content/content.c @@ -247,7 +247,8 @@ const char * const content_status_name[] = { /** An entry in handler_map. */ struct handler_entry { - bool (*create)(struct content *c, const char *params[]); + bool (*create)(struct content *c, struct content *parent, + const char *params[]); bool (*process_data)(struct content *c, char *data, unsigned int size); bool (*convert)(struct content *c, int width, int height); void (*reformat)(struct content *c, int width, int height); @@ -280,7 +281,8 @@ static const struct handler_entry handler_map[] = { {textplain_create, textplain_process_data, textplain_convert, textplain_reformat, textplain_destroy, 0, textplain_redraw, 0, 0, 0, true}, - {0, 0, css_convert, 0, css_destroy, 0, 0, 0, 0, 0, false}, + {nscss_create, nscss_process_data, nscss_convert, 0, nscss_destroy, + 0, 0, 0, 0, 0, true}, #ifdef WITH_JPEG {0, 0, nsjpeg_convert, 0, nsjpeg_destroy, 0, nsjpeg_redraw, nsjpeg_redraw_tiled, 0, 0, false}, @@ -565,7 +567,8 @@ bool content_can_reformat(struct content *c) */ bool content_set_type(struct content *c, content_type type, - const char *mime_type, const char *params[]) + const char *mime_type, const char *params[], + struct content *parent) { union content_msg_data msg_data; struct content *clone; @@ -637,7 +640,7 @@ bool content_set_type(struct content *c, content_type type, } if (handler_map[type].create) { - if (!handler_map[type].create(c, params)) { + if (!handler_map[type].create(c, parent, params)) { c->type = CONTENT_UNKNOWN; c->status = CONTENT_STATUS_ERROR; return false; -- cgit v1.2.3