mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +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
|
@ -7,6 +7,7 @@
|
|||
use dom::TElement;
|
||||
use invalidation::stylesheets::StylesheetInvalidationSet;
|
||||
use media_queries::Device;
|
||||
use selector_parser::SnapshotMap;
|
||||
use shared_lock::SharedRwLockReadGuard;
|
||||
use std::slice;
|
||||
use stylesheets::{Origin, OriginSet, OriginSetIterator, PerOrigin, StylesheetInDocument};
|
||||
|
@ -502,6 +503,7 @@ where
|
|||
pub fn flush<'a, E>(
|
||||
&'a mut self,
|
||||
document_element: Option<E>,
|
||||
snapshots: Option<&SnapshotMap>,
|
||||
) -> StylesheetFlusher<'a, S>
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -510,7 +512,9 @@ where
|
|||
|
||||
debug!("StylesheetSet::flush");
|
||||
|
||||
let had_invalidations = self.invalidations.flush(document_element);
|
||||
let had_invalidations =
|
||||
self.invalidations.flush(document_element, snapshots);
|
||||
|
||||
let origins_dirty =
|
||||
mem::replace(&mut self.origins_dirty, OriginSet::empty());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue