Issue #2143 - Implement CSS env() Environment Variables

This commit is contained in:
Martok 2023-03-05 23:05:33 +01:00 committed by roytam1
commit 2b903a20b3
2 changed files with 61 additions and 23 deletions

View file

@ -752,7 +752,11 @@ nsCSSScanner::ScanIdent(nsCSSToken& aToken)
aToken.mType = eCSSToken_Function;
if (aToken.mIdent.LowerCaseEqualsLiteral("url")) {
NextURL(aToken);
} else if (aToken.mIdent.LowerCaseEqualsLiteral("var")) {
} else if (aToken.mIdent.LowerCaseEqualsLiteral("var") ||
aToken.mIdent.LowerCaseEqualsLiteral("env")) {
// env() queries are technically not variables, but share all the
// same handling. For the purposes of resolving the token stream later,
// pretend they are.
mSeenVariableReference = true;
}
return true;