Bug 525608 followup. Initialize the variable, and remove the extra branch. r=dbaron

This commit is contained in:
Boris Zbarsky 2009-12-12 00:03:17 -08:00
parent 8c7d101795
commit d01f0e2af4

View File

@ -2505,7 +2505,8 @@ CSSParserImpl::ParseSelectorGroup(nsCSSSelectorList*& aList)
}
nsCOMPtr<nsIAtom> pseudoElement;
nsAutoPtr<nsPseudoClassList> pseudoElementArgs;
nsCSSPseudoElements::Type pseudoElementType;
nsCSSPseudoElements::Type pseudoElementType =
nsCSSPseudoElements::ePseudo_NotPseudoElement;
nsSelectorParsingStatus parsingStatus =
ParseSelector(*newSelector, getter_AddRefs(pseudoElement),
getter_Transfers(pseudoElementArgs),
@ -2520,8 +2521,7 @@ CSSParserImpl::ParseSelectorGroup(nsCSSSelectorList*& aList)
list = nsnull;
break;
}
if (pseudoElement &&
pseudoElementType == nsCSSPseudoElements::ePseudo_AnonBox &&
if (pseudoElementType == nsCSSPseudoElements::ePseudo_AnonBox &&
(list || !IsUniversalSelector(*newSelector))) {
REPORT_UNEXPECTED(PEAnonBoxNotAlone);
list = nsnull;