Add diagnostic for nested @-rules that are ignored. (Bug 652014) r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Thu, 21 Apr 2011 20:17:32 -0700
changeset 68414 e00435bb54b5551d807691976dad5b8f11789849
parent 68413 156e72ac605a4eaf86fe7e802169fe78182d1a0a
child 68415 c4b82ec27d6d6e1c02ef0abb3b6e805bfdd092ec
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky
bugs652014
milestone6.0a1
first release with
nightly linux32
e00435bb54b5 / 6.0a1 / 20110422030558 / files
nightly linux64
e00435bb54b5 / 6.0a1 / 20110422030558 / files
nightly mac
e00435bb54b5 / 6.0a1 / 20110422030558 / files
nightly win32
e00435bb54b5 / 6.0a1 / 20110422030558 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Add diagnostic for nested @-rules that are ignored. (Bug 652014) r=bzbarsky
dom/locales/en-US/chrome/layout/css.properties
layout/style/nsCSSParser.cpp
--- a/dom/locales/en-US/chrome/layout/css.properties
+++ b/dom/locales/en-US/chrome/layout/css.properties
@@ -50,16 +50,17 @@ PECharsetRuleEOF=charset string in @char
 PECharsetRuleNotString=Expected charset string but found '%1$S'.
 PEGatherMediaEOF=end of media list in @import or @media rule
 PEGatherMediaNotComma=Expected ',' in media list but found '%1$S'.
 PEGatherMediaNotIdent=Expected identifier in media list but found '%1$S'.
 PEImportNotURI=Expected URI in @import rule but found '%1$S'.
 PEImportBadURI=Invalid URI in @import rule: '%1$S'.
 PEImportUnexpected=Found unexpected '%1$S' within @import.
 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'.
 PEMozDocRuleNotURI=Expected URI in @-moz-document rule but found '%1$S'.
 PEAtNSPrefixEOF=namespace prefix in @namespace rule
 PEAtNSURIEOF=namespace URI in @namespace rule
 PEAtNSUnexpected=Unexpected token within @namespace: '%1$S'.
 PEKeyframeNameEOF=name of @keyframes rule.
 PEKeyframeBadName=Expected identifier for name of @keyframes rule.
 PEKeyframeBrace=Expected opening { of @keyframes rule.
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -2059,16 +2059,18 @@ CSSParserImpl::ParseGroupRule(css::Group
       REPORT_UNEXPECTED_EOF(PEGroupRuleEOF);
       break;
     }
     if (mToken.IsSymbol('}')) { // done!
       UngetToken();
       break;
     }
     if (eCSSToken_AtKeyword == mToken.mType) {
+      REPORT_UNEXPECTED_TOKEN(PEGroupRuleNestedAtRule);
+      OUTPUT_ERROR();
       SkipAtRule(PR_TRUE); // group rules cannot contain @rules
       continue;
     }
     UngetToken();
     ParseRuleSet(AppendRuleToSheet, this, PR_TRUE);
   }
   PopGroup();