mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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
This commit is contained in:
parent
c2dfece49f
commit
657d8b8e31
8 changed files with 95 additions and 37 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue