mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Remove document member from struct sgml_parser
The document URI can be accessed from the cache entry.
This commit is contained in:
parent
1d24d549e4
commit
38b8503161
@ -760,7 +760,6 @@ render_dom_document(struct cache_entry *cached, struct document *document,
|
||||
document->bgcolor = document->options.default_bg;
|
||||
|
||||
parser = init_sgml_parser(SGML_PARSER_STREAM, &renderer, cached,
|
||||
document,
|
||||
dom_source_renderer_push_callbacks,
|
||||
dom_source_renderer_pop_callbacks);
|
||||
if (!parser) return;
|
||||
|
@ -308,7 +308,7 @@ parse_sgml_document(struct dom_stack *stack, struct scanner *scanner)
|
||||
|
||||
struct sgml_parser *
|
||||
init_sgml_parser(enum sgml_parser_type type, void *renderer,
|
||||
struct cache_entry *cached, struct document *document,
|
||||
struct cache_entry *cached,
|
||||
dom_stack_callback_T push_callbacks[DOM_NODES],
|
||||
dom_stack_callback_T pop_callbacks[DOM_NODES])
|
||||
{
|
||||
@ -319,7 +319,6 @@ init_sgml_parser(enum sgml_parser_type type, void *renderer,
|
||||
if (!parser) return NULL;
|
||||
|
||||
parser->type = type;
|
||||
parser->document = document;
|
||||
parser->cache_entry = cached;
|
||||
parser->info = &sgml_html_info;
|
||||
|
||||
@ -347,7 +346,7 @@ parse_sgml(struct sgml_parser *parser, struct string *buffer)
|
||||
|
||||
init_scanner(&parser->scanner, &sgml_scanner_info, source, end);
|
||||
|
||||
parser->root = add_sgml_document(&parser->stack, parser->document->uri);
|
||||
parser->root = add_sgml_document(&parser->stack, parser->cache_entry->uri);
|
||||
if (parser->root) {
|
||||
parse_sgml_document(&parser->stack, &parser->scanner);
|
||||
}
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include "util/scanner.h"
|
||||
|
||||
struct cache_entry;
|
||||
struct document;
|
||||
struct string;
|
||||
struct uri;
|
||||
|
||||
enum sgml_parser_type {
|
||||
/* The first one is a DOM tree builder. */
|
||||
@ -28,7 +28,6 @@ struct sgml_parser {
|
||||
|
||||
struct sgml_info *info;
|
||||
|
||||
struct document *document;
|
||||
struct cache_entry *cache_entry;
|
||||
struct dom_node *root;
|
||||
|
||||
@ -45,7 +44,7 @@ struct sgml_parser_state {
|
||||
|
||||
struct sgml_parser *
|
||||
init_sgml_parser(enum sgml_parser_type type, void *renderer,
|
||||
struct cache_entry *cached, struct document *document,
|
||||
struct cache_entry *cached,
|
||||
dom_stack_callback_T push_callbacks[DOM_NODES],
|
||||
dom_stack_callback_T pop_callbacks[DOM_NODES]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user