mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 773296 - Part 25: Parse variable declarations in @supports conditions. r=dbaron
Since we cannot parse and discard a white space token after the ':' in a custom property declaration, we instead explicitly skip over it when parsing a non-custom property's value.
This commit is contained in:
parent
57f7c4a4c8
commit
930a09233d
@ -3691,18 +3691,35 @@ CSSParserImpl::ParseSupportsConditionInParensInsideParens(bool& aConditionMet)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ExpectSymbol(')', true)) {
|
||||
UngetToken();
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCSSProperty propID = nsCSSProps::LookupProperty(propertyName,
|
||||
nsCSSProps::eEnabled);
|
||||
if (propID == eCSSProperty_UNKNOWN) {
|
||||
if (ExpectSymbol(')', true)) {
|
||||
UngetToken();
|
||||
return false;
|
||||
}
|
||||
aConditionMet = false;
|
||||
SkipUntil(')');
|
||||
UngetToken();
|
||||
} else if (propID == eCSSPropertyExtra_variable) {
|
||||
if (ExpectSymbol(')', false)) {
|
||||
UngetToken();
|
||||
return false;
|
||||
}
|
||||
CSSVariableDeclarations::Type variableType;
|
||||
nsString variableValue;
|
||||
aConditionMet =
|
||||
ParseVariableDeclaration(&variableType, variableValue) &&
|
||||
ParsePriority() != ePriority_Error;
|
||||
if (!aConditionMet) {
|
||||
SkipUntil(')');
|
||||
UngetToken();
|
||||
}
|
||||
} else {
|
||||
if (ExpectSymbol(')', true)) {
|
||||
UngetToken();
|
||||
return false;
|
||||
}
|
||||
aConditionMet = ParseProperty(propID) &&
|
||||
ParsePriority() != ePriority_Error;
|
||||
if (!aConditionMet) {
|
||||
|
Loading…
Reference in New Issue
Block a user