servo: Merge #18246 - stylo: followup fixes for restyle roots (from bholley:restyle_root_followups); r=emilio

https://bugzilla.mozilla.org/show_bug.cgi?id=1392863

Source-Repo: https://github.com/servo/servo
Source-Revision: 1fd0edf158bb479b420fb6ddc76470d82c88cb61

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e8f1719c27589efb90b7f844eadaa4ed68b62137
This commit is contained in:
Bobby Holley 2017-08-26 12:22:33 -05:00
Родитель 1a648d444b
Коммит 1ad4801a38
3 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -506,7 +506,7 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
/// In Gecko, this corresponds to the regular dirty descendants bit, the
/// animation-only dirty descendants bit, and the lazy frame construction
/// descendants bit.
unsafe fn clear_descendants_bits(&self) { self.unset_dirty_descendants(); }
unsafe fn clear_descendant_bits(&self) { self.unset_dirty_descendants(); }
/// Clear all element flags related to dirtiness.
///

Просмотреть файл

@ -1094,7 +1094,7 @@ impl<'le> TElement for GeckoElement<'le> {
self.unset_flags(ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32)
}
unsafe fn clear_descendants_bits(&self) {
unsafe fn clear_descendant_bits(&self) {
self.unset_flags(ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO as u32 |
NODE_DESCENDANTS_NEED_FRAMES as u32)
@ -1159,7 +1159,9 @@ impl<'le> TElement for GeckoElement<'le> {
let ptr = self.0.mServoData.get();
unsafe {
self.unset_flags(ELEMENT_HAS_SNAPSHOT as u32 |
ELEMENT_HANDLED_SNAPSHOT as u32);
ELEMENT_HANDLED_SNAPSHOT as u32 |
structs::Element_kAllServoDescendantBits |
NODE_NEEDS_FRAME as u32);
}
if !ptr.is_null() {
debug!("Dropping ElementData for {:?}", self);

Просмотреть файл

@ -878,11 +878,8 @@ where
}
}
}
if p == root {
// Make sure not to clear NODE_NEEDS_FRAME on the root.
p.clear_descendants_bits();
} else {
p.clear_dirty_bits();
}
}
// Make sure not to clear NODE_NEEDS_FRAME on the root.
root.clear_descendant_bits();
}