mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Short circuit media queries test if stylist is already dirty.
This commit is contained in:
parent
11cf538ff4
commit
b278fc2284
1 changed files with 1 additions and 1 deletions
|
@ -378,7 +378,7 @@ impl Stylist {
|
|||
}
|
||||
|
||||
pub fn set_device(&mut self, device: Device) {
|
||||
let is_dirty = self.stylesheets.iter().any(|stylesheet| {
|
||||
let is_dirty = self.is_dirty || self.stylesheets.iter().any(|stylesheet| {
|
||||
let mut stylesheet_dirty = false;
|
||||
iter_stylesheet_media_rules(stylesheet, |rule| {
|
||||
stylesheet_dirty |= rule.media_queries.evaluate(&self.device) !=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue