mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Expose chrome-only environment variables to all chrome:// documents, not just chrome-docshells
This will be necessary to make the new env var testable. Reviewed in: https://phabricator.services.mozilla.com/D168148
This commit is contained in:
parent
017ab0cb24
commit
89e01f1df6
1 changed files with 4 additions and 1 deletions
|
@ -541,8 +541,11 @@ impl Device {
|
|||
}
|
||||
|
||||
/// Return whether the document is a chrome document.
|
||||
///
|
||||
/// 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.pref_sheet_prefs().mIsChrome
|
||||
self.document().mDocURISchemeIsChrome()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue