Implement StyleSheet.disabled.

This commit is contained in:
Cameron McCormack 2016-11-23 18:07:16 +08:00
parent 4529435f96
commit 64ff6dc103
10 changed files with 62 additions and 16 deletions

View file

@ -169,7 +169,7 @@ impl Stylist {
}
fn add_stylesheet(&mut self, stylesheet: &Stylesheet) {
if !stylesheet.is_effective_for_device(&self.device) {
if stylesheet.disabled() || !stylesheet.is_effective_for_device(&self.device) {
return;
}