1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00

[html] Assign document to html_context every time

This commit is contained in:
Witold Filipczyk 2023-06-04 21:08:28 +02:00
parent 2aa34e0f22
commit 755b588387
2 changed files with 2 additions and 4 deletions

View File

@ -67,9 +67,9 @@ struct el_sheet {
struct html_context {
struct document *document;
#ifdef CONFIG_CSS
#ifdef CONFIG_LIBCSS
struct document *document;
LIST_OF(struct el_sheet) sheets;
css_select_ctx *select_ctx;
/* The default stylesheet is initially merged into it. When parsing CSS

View File

@ -822,10 +822,8 @@ init_html_parser(struct uri *uri, struct document *document,
html_context = (struct html_context *)mem_calloc(1, sizeof(*html_context));
if (!html_context) return NULL;
#ifdef CONFIG_CSS
#ifdef CONFIG_LIBCSS
html_context->document = document;
#endif
#ifdef CONFIG_CSS
html_context->css_styles.import = import_css_stylesheet;
init_css_selector_set(&html_context->css_styles.selectors);
#endif