summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-23 23:05:36 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-05-24 10:46:19 +0100
commitfa5bda25929f86133618d7ec9e664c6243f94eca (patch)
treef7f406355e11c3afd030895774eb8da8b992eda1 /src
parent747cf5e859cd0f26c140c7687dca227f1e316781 (diff)
downloadlibcss-master.tar.gz
libcss-master.tar.bz2
Parse/MQ: unknown media-types do not matchHEADmaster
Per https://www.w3.org/TR/mediaqueries-4/#error-handling, "An unknown <media-type> must be treated as not matching" Ensure, however, that a rule with a condition and no type behaves as if type was all.
Diffstat (limited to 'src')
-rw-r--r--src/parse/mq.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/parse/mq.c b/src/parse/mq.c
index dde2bbe..b5478a1 100644
--- a/src/parse/mq.c
+++ b/src/parse/mq.c
@@ -1012,6 +1012,7 @@ static css_error mq_parse_media_query(lwc_string **strings,
return error;
}
+ result->type = CSS_MEDIA_ALL;
goto finished;
}
@@ -1066,10 +1067,6 @@ static css_error mq_parse_media_query(lwc_string **strings,
}
finished:
- if (result->type == 0) {
- result->type = CSS_MEDIA_ALL;
- }
-
*query = result;
return CSS_OK;
}