aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/parser.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-10-02 19:40:18 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-10-07 13:13:36 +0200
commitb0706d5cf04f6a8704185e0f1825cc50cae2f998 (patch)
tree612050d993e7add01d118b3d4e8e640a1f8af955 /components/style/parser.rs
parent04b73860703ce3b4a8ae42d6428c4851a992fe58 (diff)
downloadservo-b0706d5cf04f6a8704185e0f1825cc50cae2f998.tar.gz
servo-b0706d5cf04f6a8704185e0f1825cc50cae2f998.zip
stylo: Add a mechanism to restrict media-features to UA and chrome sheets.
Reviewed-by: xidorn Bug: 1396066 MozReview-Commit-ID: 38jRV6mPbE3
Diffstat (limited to 'components/style/parser.rs')
-rw-r--r--components/style/parser.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/style/parser.rs b/components/style/parser.rs
index 20ea720f613..6e08d937b76 100644
--- a/components/style/parser.rs
+++ b/components/style/parser.rs
@@ -130,6 +130,11 @@ impl<'a> ParserContext<'a> {
};
context.error_reporter.report_error(self.url_data, location, error)
}
+
+ /// Returns whether this is a chrome stylesheets.
+ pub fn in_chrome_stylesheet(&self) -> bool {
+ self.url_data.is_chrome()
+ }
}
// XXXManishearth Replace all specified value parse impls with impls of this