diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index c05413f1b83..c556da1383b 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -2207,11 +2207,13 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, aParsingStatus = SELECTOR_PARSING_STOPPED_ERROR; return; } - // CSS2 pseudo-elements are allowed to have a single ':' on them. Others - // (CSS3+ pseudo-elements and various -moz-* pseudo-elements) must have - // |parsingPseudoElement| set. + // CSS2 pseudo-elements and -moz-tree-* pseudo-elements are allowed + // to have a single ':' on them. Others (CSS3+ pseudo-elements and + // various -moz-* pseudo-elements) must have |parsingPseudoElement| + // set. if (!parsingPseudoElement && - !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo)) { + !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) && + !IsTreePseudoElement(pseudo)) { REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("This pseudo-element must use the \"::\" form: ")); UngetToken(); aParsingStatus = SELECTOR_PARSING_STOPPED_ERROR; diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index c05413f1b83..c556da1383b 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -2207,11 +2207,13 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, aParsingStatus = SELECTOR_PARSING_STOPPED_ERROR; return; } - // CSS2 pseudo-elements are allowed to have a single ':' on them. Others - // (CSS3+ pseudo-elements and various -moz-* pseudo-elements) must have - // |parsingPseudoElement| set. + // CSS2 pseudo-elements and -moz-tree-* pseudo-elements are allowed + // to have a single ':' on them. Others (CSS3+ pseudo-elements and + // various -moz-* pseudo-elements) must have |parsingPseudoElement| + // set. if (!parsingPseudoElement && - !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo)) { + !nsCSSPseudoElements::IsCSS2PseudoElement(pseudo) && + !IsTreePseudoElement(pseudo)) { REPORT_UNEXPECTED_TOKEN(NS_LITERAL_STRING("This pseudo-element must use the \"::\" form: ")); UngetToken(); aParsingStatus = SELECTOR_PARSING_STOPPED_ERROR;