From 5d1a706bfc5d25ea0fc2060772e44222ea711df5 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 4 May 2019 14:10:41 +0100 Subject: 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 --- src/select/computed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/select/computed.c') 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; -- cgit v1.2.3