mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Be consistent for which URIs we expose chrome rules
Differential Revision: https://phabricator.services.mozilla.com/D171640
This commit is contained in:
parent
664e44385e
commit
cfb7a9a108
2 changed files with 3 additions and 3 deletions
|
@ -162,7 +162,7 @@ impl CssEnvironment {
|
||||||
if let Some(var) = ENVIRONMENT_VARIABLES.iter().find(|var| var.name == *name) {
|
if let Some(var) = ENVIRONMENT_VARIABLES.iter().find(|var| var.name == *name) {
|
||||||
return Some((var.evaluator)(device));
|
return Some((var.evaluator)(device));
|
||||||
}
|
}
|
||||||
if !device.is_chrome_document() {
|
if !device.chrome_rules_enabled_for_document() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let var = CHROME_ENVIRONMENT_VARIABLES
|
let var = CHROME_ENVIRONMENT_VARIABLES
|
||||||
|
|
|
@ -559,7 +559,7 @@ impl Device {
|
||||||
/// This check is consistent with how we enable chrome rules for chrome:// and resource://
|
/// This check is consistent with how we enable chrome rules for chrome:// and resource://
|
||||||
/// stylesheets (and thus chrome:// documents).
|
/// stylesheets (and thus chrome:// documents).
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn is_chrome_document(&self) -> bool {
|
pub fn chrome_rules_enabled_for_document(&self) -> bool {
|
||||||
self.document().mDocURISchemeIsChrome()
|
self.document().mChromeRulesEnabled()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue