From d1a537b9cfe0d3c8b190028a80d0564299e3e46d Mon Sep 17 00:00:00 2001 From: Jeremy Andrews Date: Sat, 19 Jun 2021 15:01:08 -0500 Subject: [PATCH] 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. --- layout/style/nsCSSParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 078cbaecdf..4be2372347 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -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);