Minor layout thread cleanups:

- lifetime naming
- unrequired reference removal
- containing_shadow_host getter simplification
- use stylist.device getter where possible
This commit is contained in:
Fernando Jiménez Moreno 2019-02-20 16:30:38 +01:00
parent 00178aff4d
commit a841c713d6
2 changed files with 13 additions and 14 deletions

View file

@ -1351,10 +1351,13 @@ impl LayoutThread {
document.shadow_roots().len()
);
let device = Device::new(MediaType::screen(), initial_viewport, device_pixel_ratio);
// Flush shadow roots stylesheets if dirty.
for shadow_root in document.shadow_roots() {
shadow_root.flush_stylesheets(&device, document.quirks_mode(), guards.author.clone());
shadow_root.flush_stylesheets(
&self.stylist.device(),
document.quirks_mode(),
guards.author.clone(),
);
}
let restyles = document.drain_pending_restyles();