mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #19315 - emilio:chrome-rules-user-sheets, r=heycam
style: Enable chrome-only CSS features in user stylesheets. MozReview-Commit-ID: FJ4vTiOrotH Bug: 1418963 Reviewed-by: heycam <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19315) <!-- Reviewable:end -->
This commit is contained in:
commit
5905f8d3ea
5 changed files with 52 additions and 29 deletions
|
@ -70,8 +70,9 @@ impl<'a> SelectorParser<'a> {
|
|||
|
||||
/// Whether we're parsing selectors in a stylesheet that has chrome
|
||||
/// privilege.
|
||||
pub fn in_chrome_stylesheet(&self) -> bool {
|
||||
self.url_data.map_or(false, |d| d.is_chrome())
|
||||
pub fn chrome_rules_enabled(&self) -> bool {
|
||||
self.url_data.map_or(false, |d| d.is_chrome()) ||
|
||||
self.stylesheet_origin == Origin::User
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue