diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-12-01 13:10:59 +0000 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2020-12-01 13:10:59 +0000 |
commit | 03ab48a3171d358d50d0d97331a64a79c084521b (patch) | |
tree | c0775e44f8536a34037cd9a32fd2e6d65871afdd | |
parent | e2b4077eed0ad778847cd7b17406e8bf8b61a4ae (diff) | |
download | libcss-03ab48a3171d358d50d0d97331a64a79c084521b.tar.gz |
select: mq: Fix to convert parse unit types to public unit types.
-rw-r--r-- | src/select/mq.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/select/mq.h b/src/select/mq.h index c01144b..9a97b7d 100644 --- a/src/select/mq.h +++ b/src/select/mq.h @@ -9,6 +9,9 @@ #ifndef css_select_mq_h_ #define css_select_mq_h_ +#include "select/properties/properties.h" +#include "select/properties/helpers.h" + static inline css_fixed css_len2px( css_fixed length, css_unit unit, @@ -122,9 +125,10 @@ static inline bool mq_match_feature_range_length_op1( return false; } - if (value->data.dim.unit != CSS_UNIT_PX) { + if (value->data.dim.unit != UNIT_PX) { v = css_len2px(value->data.dim.len, - value->data.dim.unit, media); + css__to_css_unit(value->data.dim.unit), + media); } else { v = value->data.dim.len; } @@ -156,9 +160,10 @@ static inline bool mq_match_feature_range_length_op2( return false; } - if (value->data.dim.unit != CSS_UNIT_PX) { + if (value->data.dim.unit != UNIT_PX) { v = css_len2px(value->data.dim.len, - value->data.dim.unit, media); + css__to_css_unit(value->data.dim.unit), + media); } else { v = value->data.dim.len; } |