mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[html] Assign document to html_context every time
This commit is contained in:
parent
2aa34e0f22
commit
755b588387
@ -67,9 +67,9 @@ struct el_sheet {
|
|||||||
|
|
||||||
|
|
||||||
struct html_context {
|
struct html_context {
|
||||||
|
struct document *document;
|
||||||
#ifdef CONFIG_CSS
|
#ifdef CONFIG_CSS
|
||||||
#ifdef CONFIG_LIBCSS
|
#ifdef CONFIG_LIBCSS
|
||||||
struct document *document;
|
|
||||||
LIST_OF(struct el_sheet) sheets;
|
LIST_OF(struct el_sheet) sheets;
|
||||||
css_select_ctx *select_ctx;
|
css_select_ctx *select_ctx;
|
||||||
/* The default stylesheet is initially merged into it. When parsing CSS
|
/* The default stylesheet is initially merged into it. When parsing CSS
|
||||||
|
@ -822,10 +822,8 @@ init_html_parser(struct uri *uri, struct document *document,
|
|||||||
html_context = (struct html_context *)mem_calloc(1, sizeof(*html_context));
|
html_context = (struct html_context *)mem_calloc(1, sizeof(*html_context));
|
||||||
if (!html_context) return NULL;
|
if (!html_context) return NULL;
|
||||||
|
|
||||||
#ifdef CONFIG_CSS
|
|
||||||
#ifdef CONFIG_LIBCSS
|
|
||||||
html_context->document = document;
|
html_context->document = document;
|
||||||
#endif
|
#ifdef CONFIG_CSS
|
||||||
html_context->css_styles.import = import_css_stylesheet;
|
html_context->css_styles.import = import_css_stylesheet;
|
||||||
init_css_selector_set(&html_context->css_styles.selectors);
|
init_css_selector_set(&html_context->css_styles.selectors);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user