aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-01-25 02:53:49 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-01-27 02:34:27 +0100
commit657d8b8e31d0a026bc630d238b77076bb69117eb (patch)
treeaaf2255e0aedc320b01a124683ab68c4176eeb95 /components/layout_thread/lib.rs
parentc2dfece49f1d59f51a3207cd3d88c282ee1adf70 (diff)
downloadservo-657d8b8e31d0a026bc630d238b77076bb69117eb.tar.gz
servo-657d8b8e31d0a026bc630d238b77076bb69117eb.zip
style: Look at the snapshots when invalidating due to stylesheet changes.
Otherwise removal of stylesheets may get out of sync with other DOM changes, and we may fail to invalidate the style of the affected elements. Bug: 1432850 Reviewed-by: bz MozReview-Commit-ID: DrMTgLzQcnk
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r--components/layout_thread/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index fcd790fe6ec..66f328f4465 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -1194,8 +1194,6 @@ impl LayoutThread {
debug!("Doc sheets changed, flushing author sheets too");
self.stylist.force_stylesheet_origins_dirty(Origin::Author.into());
}
-
- self.stylist.flush(&guards, Some(element));
}
if viewport_size_changed {
@@ -1246,6 +1244,8 @@ impl LayoutThread {
debug!("Noting restyle for {:?}: {:?}", el, style_data);
}
+ self.stylist.flush(&guards, Some(element), Some(&map));
+
// Create a layout context for use throughout the following passes.
let mut layout_context =
self.build_layout_context(guards.clone(), true, &map);