Issue #1776 - Support detecting bool preferences in chrome stylesheets

This functionality was already added to Gecko for UA stylesheets allow the "dom.details_element.enabled" preference to work. I changed the condition to allow bool preferences to be used in chrome stylesheets as well.
This commit is contained in:
Jeremy Andrews 2021-06-19 15:01:08 -05:00 committed by roytam1
commit d1a537b9cf

View file

@ -4667,7 +4667,7 @@ CSSParserImpl::ParseSupportsConditionInParens(bool& aConditionMet)
return true;
}
if (AgentRulesEnabled() &&
if ((AgentRulesEnabled() || ChromeRulesEnabled()) &&
mToken.mType == eCSSToken_Function &&
mToken.mIdent.LowerCaseEqualsLiteral("-moz-bool-pref")) {
return ParseSupportsMozBoolPrefName(aConditionMet);