diff options
Diffstat (limited to 'content/handlers/html')
-rw-r--r-- | content/handlers/html/box_construct.c | 2 | ||||
-rw-r--r-- | content/handlers/html/html.c | 1 | ||||
-rw-r--r-- | content/handlers/html/html_internal.h | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/content/handlers/html/box_construct.c b/content/handlers/html/box_construct.c index e7ac811ef..eb3bba7c3 100644 --- a/content/handlers/html/box_construct.c +++ b/content/handlers/html/box_construct.c @@ -1373,7 +1373,7 @@ css_select_results *box_get_style(html_content *c, ctx.parent_style = parent_style; /* Select style for element */ - styles = nscss_get_style(&ctx, n, CSS_MEDIA_SCREEN, inline_style); + styles = nscss_get_style(&ctx, n, &c->media, inline_style); /* No longer need inline style */ if (inline_style != NULL) diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c index 30af90f97..9c60c7bb1 100644 --- a/content/handlers/html/html.c +++ b/content/handlers/html/html.c @@ -950,6 +950,7 @@ html_create_html_data(html_content *c, const http_parameter *params) c->stylesheet_count = 0; c->stylesheets = NULL; c->select_ctx = NULL; + c->media.type = CSS_MEDIA_SCREEN; c->universal = NULL; c->num_objects = 0; c->object_list = NULL; diff --git a/content/handlers/html/html_internal.h b/content/handlers/html/html_internal.h index a4ae1da57..2ba96f0f8 100644 --- a/content/handlers/html/html_internal.h +++ b/content/handlers/html/html_internal.h @@ -156,6 +156,8 @@ typedef struct html_content { struct html_stylesheet *stylesheets; /**< Style selection context */ css_select_ctx *select_ctx; + /**< Style selection media specification */ + css_media media; /**< Universal selector */ lwc_string *universal; |