aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs20
1 files changed, 6 insertions, 14 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index adf47842e82..661d3289671 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -63,7 +63,8 @@ use style::attr::AttrValue;
use style::computed_values::display;
use style::context::{QuirksMode, SharedStyleContext};
use style::data::ElementData;
-use style::dom::{LayoutIterator, NodeInfo, OpaqueNode, PresentationalHintsSynthetizer, TElement, TNode};
+use style::dom::{DirtyDescendants, LayoutIterator, NodeInfo, OpaqueNode, PresentationalHintsSynthetizer};
+use style::dom::{TElement, TNode};
use style::dom::UnsafeNode;
use style::element_state::*;
use style::properties::{ComputedValues, PropertyDeclarationBlock};
@@ -487,6 +488,9 @@ impl<'le> ServoLayoutElement<'le> {
}
}
+ // FIXME(bholley): This should be merged with TElement::note_dirty_descendants,
+ // but that requires re-testing and possibly fixing the broken callers given
+ // the FIXME below, which I don't have time to do right now.
pub unsafe fn note_dirty_descendant(&self) {
use ::selectors::Element;
@@ -501,19 +505,7 @@ impl<'le> ServoLayoutElement<'le> {
current = el.parent_element();
}
- debug_assert!(self.dirty_descendants_bit_is_propagated());
- }
-
- fn dirty_descendants_bit_is_propagated(&self) -> bool {
- use ::selectors::Element;
-
- let mut current = Some(*self);
- while let Some(el) = current {
- if !el.has_dirty_descendants() { return false; }
- current = el.parent_element();
- }
-
- true
+ debug_assert!(self.descendants_bit_is_propagated::<DirtyDescendants>());
}
}