From f8c906e4c6ff36cefe0803cba6b2a083efe5bcb6 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 20 Nov 2016 13:10:02 +0000 Subject: Media Queries: datastructures and plumbing. No parse implementation as yet. Selection hasn't been updated, either. One item of note in that area is that a client currently provides the media for top-level sheets being added to a selection context. This probably needs to change to providing a lwc_string containing the verbatim media query from the containing document's import mechanism. That way, the internal representation of media queries can remain opaque to clients. --- src/stylesheet.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/stylesheet.h') diff --git a/src/stylesheet.h b/src/stylesheet.h index 18e077e..a44ad1f 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -20,6 +20,7 @@ #include "bytecode/bytecode.h" #include "parse/parse.h" +#include "parse/mq.h" #include "select/hash.h" typedef struct css_rule css_rule; @@ -132,7 +133,7 @@ typedef struct css_rule_selector { typedef struct css_rule_media { css_rule base; - uint64_t media; + css_mq_query *media; css_rule *first_child; css_rule *last_child; @@ -155,7 +156,7 @@ typedef struct css_rule_import { css_rule base; lwc_string *url; - uint64_t media; + css_mq_query *media; css_stylesheet *sheet; } css_rule_import; @@ -268,10 +269,10 @@ css_error css__stylesheet_rule_set_charset(css_stylesheet *sheet, css_rule *rule, lwc_string *charset); css_error css__stylesheet_rule_set_nascent_import(css_stylesheet *sheet, - css_rule *rule, lwc_string *url, uint64_t media); + css_rule *rule, lwc_string *url, css_mq_query *media); css_error css__stylesheet_rule_set_media(css_stylesheet *sheet, - css_rule *rule, uint64_t media); + css_rule *rule, css_mq_query *media); css_error css__stylesheet_rule_set_page_selector(css_stylesheet *sheet, css_rule *rule, css_selector *sel); -- cgit v1.2.3