From e3f8652f083435f6c51409c29ec5a41acaca0c70 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 30 Jul 2018 13:44:00 +0100 Subject: Media Queries: Update stylesheet import for media query lists. --- src/select/select.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/select') diff --git a/src/select/select.c b/src/select/select.c index 644369a..480b9f5 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -1847,7 +1847,8 @@ css_error select_from_sheet(css_select_ctx *ctx, const css_stylesheet *sheet, (const css_rule_import *) rule; if (import->sheet != NULL && - (import->media & state->media) != 0) { + mq__list_match(import->media, + state->media)) { /* It's applicable, so process it */ if (sp >= IMPORT_STACK_SIZE) return CSS_NOMEM; @@ -1954,7 +1955,8 @@ static css_error select_font_faces_from_sheet( (const css_rule_import *) rule; if (import->sheet != NULL && - (import->media & state->media) != 0) { + mq__list_match(import->media, + state->media)) { /* It's applicable, so process it */ if (sp >= IMPORT_STACK_SIZE) return CSS_NOMEM; -- cgit v1.2.3