From c1b91c7bf368d7ba7a51816d4a3ee9d018d9fa55 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 28 Aug 2007 23:04:43 +0200 Subject: [PATCH] document/html: Make HTML parser state transparent Before, *_html_parser_state() operated with struct html_element *. Now, it is transparent for the renderer (just void *), so that DOM won't have to provide this struct but will be able to use something internal. Backported from master. --- src/document/html/parser.h | 7 +++---- src/document/html/renderer.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/document/html/parser.h b/src/document/html/parser.h index 5a13a318b..44d255f92 100644 --- a/src/document/html/parser.h +++ b/src/document/html/parser.h @@ -147,11 +147,10 @@ init_html_parser(struct uri *uri, struct document_options *options, void (*line_break)(struct html_context *), void *(*special)(struct html_context *, enum html_special_type, ...)); - void done_html_parser(struct html_context *html_context); -struct html_element *init_html_parser_state(struct html_context *html_context, enum html_element_mortality_type type, int align, int margin, int width); -void done_html_parser_state(struct html_context *html_context, - struct html_element *element); + +void *init_html_parser_state(struct html_context *html_context, enum html_element_mortality_type type, int align, int margin, int width); +void done_html_parser_state(struct html_context *html_context, void *state); /* Interface for the table handling */ diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index c62586f63..836b45a09 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -2074,7 +2074,7 @@ format_html_part(struct html_context *html_context, int link_num) { struct part *part; - struct html_element *html_state; + void *html_state; struct tag *saved_last_tag_to_move = renderer_context.last_tag_to_move; struct tag *saved_last_tag_for_newline = renderer_context.last_tag_for_newline; int saved_empty_format = renderer_context.empty_format;