Add diagnostic for nested @-rules that are ignored. (Bug 652014) r=bzbarsky

This commit is contained in:
L. David Baron 2011-04-21 20:17:32 -07:00
Родитель 2eabd34794
Коммит dad5a358cd
2 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -55,6 +55,7 @@ PEImportNotURI=Expected URI in @import rule but found '%1$S'.
PEImportBadURI=Invalid URI in @import rule: '%1$S'. PEImportBadURI=Invalid URI in @import rule: '%1$S'.
PEImportUnexpected=Found unexpected '%1$S' within @import. PEImportUnexpected=Found unexpected '%1$S' within @import.
PEGroupRuleEOF=end of @media or @-moz-document rule PEGroupRuleEOF=end of @media or @-moz-document rule
PEGroupRuleNestedAtRule=%1$S rule not allowed within @media or @-moz-document rule.
PEMozDocRuleBadFunc=Expected url(), url-prefix(), or domain() in @-moz-document rule but found '%1$S'. PEMozDocRuleBadFunc=Expected url(), url-prefix(), or domain() in @-moz-document rule but found '%1$S'.
PEMozDocRuleNotURI=Expected URI in @-moz-document rule but found '%1$S'. PEMozDocRuleNotURI=Expected URI in @-moz-document rule but found '%1$S'.
PEAtNSPrefixEOF=namespace prefix in @namespace rule PEAtNSPrefixEOF=namespace prefix in @namespace rule

Просмотреть файл

@ -2064,6 +2064,8 @@ CSSParserImpl::ParseGroupRule(css::GroupRule* aRule,
break; break;
} }
if (eCSSToken_AtKeyword == mToken.mType) { if (eCSSToken_AtKeyword == mToken.mType) {
REPORT_UNEXPECTED_TOKEN(PEGroupRuleNestedAtRule);
OUTPUT_ERROR();
SkipAtRule(PR_TRUE); // group rules cannot contain @rules SkipAtRule(PR_TRUE); // group rules cannot contain @rules
continue; continue;
} }