style: Allow resource:// stylesheets to use chrome-only rules.

We'll use it to use @-moz-document from plaintext.css.

Differential Revision: https://phabricator.services.mozilla.com/D101516
This commit is contained in:
Emilio Cobos Álvarez 2021-01-17 15:07:49 +00:00
parent f16305d25a
commit df7ea837d8
3 changed files with 5 additions and 5 deletions

View file

@ -140,7 +140,7 @@ impl<'a> ParserContext<'a> {
/// Returns whether chrome-only rules should be parsed.
#[inline]
pub fn chrome_rules_enabled(&self) -> bool {
self.url_data.is_chrome() || self.stylesheet_origin == Origin::User
self.url_data.chrome_rules_enabled() || self.stylesheet_origin == Origin::User
}
/// Whether we're in a user-agent stylesheet or chrome rules are enabled.