summaryrefslogtreecommitdiff
path: root/src/select/computed.c
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2019-05-04 14:10:41 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2019-05-04 14:10:41 +0100
commit5d1a706bfc5d25ea0fc2060772e44222ea711df5 (patch)
tree548af2617882f5be239ea188d1c964245cfc06b3 /src/select/computed.c
parentd6126aa77eb442f446d28b6dfb15a884f209a341 (diff)
downloadlibcss-5d1a706bfc5d25ea0fc2060772e44222ea711df5.tar.gz
libcss-5d1a706bfc5d25ea0fc2060772e44222ea711df5.tar.bz2
Media queries: Update selection API to support media queries.
The API changes are: 1. When building a selection context, stylesheets added with `css_select_ctx_{append|insert}_sheet()` now have to have media strings associcated with them. Previously they took a simple bitfield for CSS media type. 2. When selecting for an element, the client needs to specify the current media requirements. Previously it only had to provide the bitfield for CSS media type. 3. Same for the css_select_font_faces API. The selection handling has been updated to handle the new API, however it is currently only looking at the media type when performing selection. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
Diffstat (limited to 'src/select/computed.c')
-rw-r--r--src/select/computed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index ebb2b29..506b079 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -250,7 +250,7 @@ css_error css__computed_style_initialise(css_computed_style *style,
return CSS_BADPARM;
state.node = NULL;
- state.media = CSS_MEDIA_ALL;
+ state.media = NULL;
state.results = NULL;
state.computed = style;
state.handler = handler;