diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-02-21 12:34:59 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-04-26 11:31:17 +0200 |
commit | 2674a3e71748eb0ef6db371fc2f1401a951b94c4 (patch) | |
tree | 3106346788c2fce743ab8a9f0a8674d0b44aea7e /components/layout_thread/lib.rs | |
parent | a841c713d653f57256e5b795197920c7ee6834e9 (diff) | |
download | servo-2674a3e71748eb0ef6db371fc2f1401a951b94c4.tar.gz servo-2674a3e71748eb0ef6db371fc2f1401a951b94c4.zip |
Flush shadow roots stylesheets only if they changed
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index 3ed2624d2d3..b44bbb54b96 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1352,13 +1352,11 @@ impl LayoutThread { ); // Flush shadow roots stylesheets if dirty. - for shadow_root in document.shadow_roots() { - shadow_root.flush_stylesheets( - &self.stylist.device(), - document.quirks_mode(), - guards.author.clone(), - ); - } + document.flush_shadow_roots_stylesheets( + &self.stylist.device(), + document.quirks_mode(), + guards.author.clone(), + ); let restyles = document.drain_pending_restyles(); debug!("Draining restyles: {}", restyles.len()); |