From 854eda8b63cc260524a5ec3e3681308b382c7060 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 27 Jul 2009 14:21:53 +0000 Subject: If, after parsing the media list, we've ended up with no media whatsoever, then the list must have been blank, which implies CSS_MEDIA_ALL. svn path=/trunk/libcss/; revision=8822 --- src/parse/language.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parse/language.c b/src/parse/language.c index e072971..fff0eff 100644 --- a/src/parse/language.c +++ b/src/parse/language.c @@ -737,7 +737,7 @@ css_error parseMediaList(css_language *c, } else if (lwc_context_string_caseless_isequal( c->sheet->dictionary, token->idata, c->strings[BRAILLE], - &match) == lwc_error_ok && match) { + &match) == lwc_error_ok && match) { ret |= CSS_MEDIA_BRAILLE; } else if (lwc_context_string_caseless_isequal( c->sheet->dictionary, @@ -796,6 +796,11 @@ css_error parseMediaList(css_language *c, consumeWhitespace(vector, ctx); } + /* If, after parsing the media list, we still have no media, + * then it must be ALL. */ + if (ret == 0) + ret = CSS_MEDIA_ALL; + *media = ret; return CSS_OK; -- cgit v1.2.3