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
This commit is contained in:
dbaron%dbaron.org 2003-09-21 05:21:40 +00:00
parent f7451a1ce3
commit 68981b901b
2 changed files with 12 additions and 8 deletions

View File

@ -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;

View File

@ -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;