mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
style: Make the servo and gecko implementations of Element::note_descendants equivalent.
This commit is contained in:
parent
54e2b7b2d5
commit
a4bc106e07
3 changed files with 71 additions and 28 deletions
|
@ -17,7 +17,7 @@
|
|||
use atomic_refcell::AtomicRefCell;
|
||||
use context::UpdateAnimationsTasks;
|
||||
use data::ElementData;
|
||||
use dom::{AnimationRules, LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
|
||||
use dom::{self, AnimationRules, DescendantsBit, LayoutIterator, NodeInfo, TElement, TNode, UnsafeNode};
|
||||
use dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||
use element_state::ElementState;
|
||||
use error_reporting::StdoutErrorReporter;
|
||||
|
@ -504,10 +504,18 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
}
|
||||
|
||||
unsafe fn set_dirty_descendants(&self) {
|
||||
debug_assert!(self.get_data().is_some());
|
||||
debug!("Setting dirty descendants: {:?}", self);
|
||||
self.set_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
|
||||
}
|
||||
|
||||
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
|
||||
debug_assert!(self.get_data().is_some());
|
||||
if dom::raw_note_descendants::<Self, B>(*self) {
|
||||
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn unset_dirty_descendants(&self) {
|
||||
self.unset_flags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO as u32)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue