REPORT_UNEXPECTED_EOF();
PRBool CSSParserImpl::ParseMediaRule(PRInt32& aErrorCode){  nsAutoString  mediaStr;  nsISupportsArray* media = nsnull;  NS_NewISupportsArray(&media);  if (media) {    if (GatherMedia(aErrorCode, mediaStr, media)) {      if ((0 < mediaStr.Length()) &&          ExpectSymbol(aErrorCode, '{', PR_TRUE)) {        // push media rule on stack, loop over children        nsICSSMediaRule*  rule = nsnull;        NS_NewCSSMediaRule(&rule);        if (rule) {          if (PushGroup(rule)) {            nsCSSSection holdSection = mSection;            mSection = eCSSSection_General;            for (;;) {              // Get next non-whitespace token              if (! GetToken(aErrorCode, PR_TRUE)) {                break;              }              if (mToken.IsSymbol('}')) { // done!                UngetToken();                break;              }              if (eCSSToken_AtKeyword == mToken.mType) {                SkipAtRule(aErrorCode); // @media cannot contain @rules                continue;              }              UngetToken();              ParseRuleSet(aErrorCode);            }            PopGroup();            if (ExpectSymbol(aErrorCode, '}', PR_TRUE)) {              rule->SetMedia(media);              AppendRule(rule);              NS_RELEASE(rule);              NS_RELEASE(media);              return PR_TRUE;            }            mSection = holdSection;          }          NS_RELEASE(rule);        }        else {  // failed to create rule, backup and skip block          UngetToken();        }      }    }    NS_RELEASE(media);  }  return PR_FALSE;}