Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/bc2b312c42d7d8eee32bf615e24533a0756db152
...commit 
http://git.netsurf-browser.org/libcss.git/commit/bc2b312c42d7d8eee32bf615e24533a0756db152
...tree 
http://git.netsurf-browser.org/libcss.git/tree/bc2b312c42d7d8eee32bf615e24533a0756db152

The branch, master has been updated
       via  bc2b312c42d7d8eee32bf615e24533a0756db152 (commit)
      from  0eadfb721c47526c7af9f280f41a781e1bc3e3d0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=bc2b312c42d7d8eee32bf615e24533a0756db152
commit bc2b312c42d7d8eee32bf615e24533a0756db152
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Select: MQ: Support prefers-color-scheme in boolean context
    
    In boolean context it indicates that the browser supports this
    feature.

diff --git a/src/select/mq.h b/src/select/mq.h
index dd3252e..89da2c5 100644
--- a/src/select/mq.h
+++ b/src/select/mq.h
@@ -145,12 +145,13 @@ static inline bool mq_match_feature(
        } else if (lwc_string_isequal(feat->name,
                        str->prefers_color_scheme, &match) == lwc_error_ok &&
                        match == true) {
-               if (!mq_match_feature_eq_ident_op1(feat->op, &feat->value,
-                               media->prefers_color_scheme)) {
-                       return false;
+               if (mq_match_feature_eq_ident_op1(feat->op, &feat->value,
+                               media->prefers_color_scheme) ||
+                   feat->op == CSS_MQ_FEATURE_OP_BOOL) {
+                       return true;
                }
 
-               return true;
+               return false;
        }
 
        /* TODO: Look at other feature names. */


-----------------------------------------------------------------------

Summary of changes:
 src/select/mq.h |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/select/mq.h b/src/select/mq.h
index dd3252e..89da2c5 100644
--- a/src/select/mq.h
+++ b/src/select/mq.h
@@ -145,12 +145,13 @@ static inline bool mq_match_feature(
        } else if (lwc_string_isequal(feat->name,
                        str->prefers_color_scheme, &match) == lwc_error_ok &&
                        match == true) {
-               if (!mq_match_feature_eq_ident_op1(feat->op, &feat->value,
-                               media->prefers_color_scheme)) {
-                       return false;
+               if (mq_match_feature_eq_ident_op1(feat->op, &feat->value,
+                               media->prefers_color_scheme) ||
+                   feat->op == CSS_MQ_FEATURE_OP_BOOL) {
+                       return true;
                }
 
-               return true;
+               return false;
        }
 
        /* TODO: Look at other feature names. */


-- 
Cascading Style Sheets library
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to