style: Be consistent for which URIs we expose chrome rules

Differential Revision: https://phabricator.services.mozilla.com/D171640
This commit is contained in:
Emilio Cobos Álvarez 2023-03-07 20:22:23 +00:00 committed by Martin Robinson
parent 664e44385e
commit cfb7a9a108
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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()
}
}