diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2016-11-20 13:10:02 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-03-10 13:42:03 +0000 |
commit | f8c906e4c6ff36cefe0803cba6b2a083efe5bcb6 (patch) | |
tree | d3ca41a93070d6c2f543179f345f38788e746d29 /src/stylesheet.h | |
parent | 4591e4851068ab16afdecbaef5eccacc71344ffa (diff) | |
download | libcss-f8c906e4c6ff36cefe0803cba6b2a083efe5bcb6.tar.gz libcss-f8c906e4c6ff36cefe0803cba6b2a083efe5bcb6.tar.bz2 |
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.
Diffstat (limited to 'src/stylesheet.h')
-rw-r--r-- | src/stylesheet.h | 9 |
1 files changed, 5 insertions, 4 deletions
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); |