From 68981b901b04364baf367fefaa5a3b19fc64f2fc Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Sun, 21 Sep 2003 05:21:40 +0000 Subject: [PATCH] Accept :-moz-tree-* pseudo elements with a single colon in them. b=219058 r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@147100 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/style/src/nsCSSParser.cpp | 10 ++++++---- mozilla/layout/style/nsCSSParser.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) 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;