diff --git a/components/style/parser.rs b/components/style/parser.rs index e38602144ef..f306e2f3838 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -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. diff --git a/components/style/selector_parser.rs b/components/style/selector_parser.rs index a8b5c3bc33e..52675abf45a 100644 --- a/components/style/selector_parser.rs +++ b/components/style/selector_parser.rs @@ -75,7 +75,7 @@ impl<'a> SelectorParser<'a> { /// Whether we're parsing selectors in a stylesheet that has chrome /// privilege. pub fn chrome_rules_enabled(&self) -> bool { - self.url_data.map_or(false, |d| d.is_chrome()) || self.stylesheet_origin == Origin::User + self.url_data.map_or(false, |d| d.chrome_rules_enabled()) || self.stylesheet_origin == Origin::User } } diff --git a/components/style/stylesheets/mod.rs b/components/style/stylesheets/mod.rs index 4c1e996fd5d..724a54ff127 100644 --- a/components/style/stylesheets/mod.rs +++ b/components/style/stylesheets/mod.rs @@ -154,8 +154,8 @@ impl UrlExtraData { /// True if this URL scheme is chrome. #[inline] - pub fn is_chrome(&self) -> bool { - self.as_ref().mIsChrome + pub fn chrome_rules_enabled(&self) -> bool { + self.as_ref().mChromeRulesEnabled } /// Create a reference to this `UrlExtraData` from a reference to pointer. @@ -213,7 +213,7 @@ impl fmt::Debug for UrlExtraData { formatter .debug_struct("URLExtraData") - .field("is_chrome", &self.is_chrome()) + .field("chrome_rules_enabled", &self.chrome_rules_enabled()) .field( "base", &DebugURI(self.as_ref().mBaseURI.raw::()),