diff options
author | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2019-06-11 13:11:14 +0100 |
---|---|---|
committer | Michael Drake <Michael Drake tlsa@netsurf-browser.org> | 2019-06-11 13:11:14 +0100 |
commit | 35ab0a4e9406f9eeb29ca261680d911c423e4f90 (patch) | |
tree | 388b73d91c281bc531d1105574f9bdb196eefb0d /src/select | |
parent | 00cafe488273eab18e9c93bf59191efaa722fc3b (diff) | |
download | libcss-35ab0a4e9406f9eeb29ca261680d911c423e4f90.tar.gz libcss-35ab0a4e9406f9eeb29ca261680d911c423e4f90.tar.bz2 |
Media queries: Simplify parsed mq data structure slightly.
Diffstat (limited to 'src/select')
-rw-r--r-- | src/select/mq.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/select/mq.h b/src/select/mq.h index f51d0db..c01144b 100644 --- a/src/select/mq.h +++ b/src/select/mq.h @@ -222,17 +222,15 @@ static inline bool mq_match_condition( { bool matched = !cond->op; - for (uint32_t i = 0; i < cond->parts->nparts; i++) { + for (uint32_t i = 0; i < cond->nparts; i++) { bool part_matched; - if (cond->parts->parts[i]->type == CSS_MQ_FEATURE) { + if (cond->parts[i]->type == CSS_MQ_FEATURE) { part_matched = mq_match_feature( - cond->parts->parts[i]->data.feat, - media); + cond->parts[i]->data.feat, media); } else { - assert(cond->parts->parts[i]->type == CSS_MQ_COND); + assert(cond->parts[i]->type == CSS_MQ_COND); part_matched = mq_match_condition( - cond->parts->parts[i]->data.cond, - media); + cond->parts[i]->data.cond, media); } if (cond->op) { |