From cfb7a9a108fbc24f53a74995789cdfe369f0fd48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 7 Mar 2023 20:22:23 +0000 Subject: [PATCH] style: Be consistent for which URIs we expose chrome rules Differential Revision: https://phabricator.services.mozilla.com/D171640 --- components/style/custom_properties.rs | 2 +- components/style/gecko/media_queries.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 25066c50c44..03cb886f028 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -162,7 +162,7 @@ impl CssEnvironment { if let Some(var) = ENVIRONMENT_VARIABLES.iter().find(|var| var.name == *name) { return Some((var.evaluator)(device)); } - if !device.is_chrome_document() { + if !device.chrome_rules_enabled_for_document() { return None; } let var = CHROME_ENVIRONMENT_VARIABLES diff --git a/components/style/gecko/media_queries.rs b/components/style/gecko/media_queries.rs index f6a628a2722..c5a5c5723af 100644 --- a/components/style/gecko/media_queries.rs +++ b/components/style/gecko/media_queries.rs @@ -559,7 +559,7 @@ impl Device { /// This check is consistent with how we enable chrome rules for chrome:// and resource:// /// stylesheets (and thus chrome:// documents). #[inline] - pub fn is_chrome_document(&self) -> bool { - self.document().mDocURISchemeIsChrome() + pub fn chrome_rules_enabled_for_document(&self) -> bool { + self.document().mChromeRulesEnabled() } }