aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-01-26 20:18:48 -0600
committerGitHub <noreply@github.com>2018-01-26 20:18:48 -0600
commitbc7dd644f6f50bd6eb3fba1547808775ee9d7620 (patch)
tree259d36aa359214ce5ac4086ae41fdfa93ca8f31a /components/layout_thread/lib.rs
parentc2dfece49f1d59f51a3207cd3d88c282ee1adf70 (diff)
parent2d395a48aad86f6d2b843f1a9934a6fbcdc37bd2 (diff)
downloadservo-bc7dd644f6f50bd6eb3fba1547808775ee9d7620.tar.gz
servo-bc7dd644f6f50bd6eb3fba1547808775ee9d7620.zip
Auto merge of #19877 - emilio:remove-sheet-oh-noes, r=bz
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 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19877) <!-- Reviewable:end -->
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);