diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2017-03-24 14:17:53 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2017-03-27 20:43:24 -0700 |
commit | 7c58483affe4970fa8b95cdb38a16db0e92010a1 (patch) | |
tree | f524adb66c8ebc64f89a8d0d414e56b64aee25e9 /components/style/traversal.rs | |
parent | 185d31f0860f9c4f22d2db9d2780a2ce08c7919c (diff) | |
download | servo-7c58483affe4970fa8b95cdb38a16db0e92010a1.tar.gz servo-7c58483affe4970fa8b95cdb38a16db0e92010a1.zip |
Centralize note_dirty_descendants implementation, and fully propagate dirty_descendants in resolve_style.
The current code can leave the tree in an inconsistent state, with the dirty
descendants bit not fully propagated.
MozReview-Commit-ID: ALI6etmlrDa
Diffstat (limited to 'components/style/traversal.rs')
-rw-r--r-- | components/style/traversal.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/traversal.rs b/components/style/traversal.rs index df70c29664c..b37b10ef94f 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -9,7 +9,7 @@ use atomic_refcell::{AtomicRefCell, AtomicRefMut}; use context::{SharedStyleContext, StyleContext, ThreadLocalStyleContext}; use data::{ElementData, ElementStyles, StoredRestyleHint}; -use dom::{NodeInfo, TElement, TNode}; +use dom::{DirtyDescendants, NodeInfo, TElement, TNode}; use matching::{MatchMethods, MatchResults}; use restyle_hints::{RESTYLE_DESCENDANTS, RESTYLE_SELF}; use selector_parser::RestyleDamage; @@ -388,7 +388,7 @@ fn resolve_style_internal<E, F>(context: &mut StyleContext<E>, // Conservatively mark us as having dirty descendants, since there might // be other unstyled siblings we miss when walking straight up the parent // chain. - unsafe { element.set_dirty_descendants() }; + unsafe { element.note_descendants::<DirtyDescendants>() }; } // If we're display:none and none of our ancestors are, we're the root |