diff --git a/components/style/dom.rs b/components/style/dom.rs index 8431f5526c3..f32f5e8361e 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -163,10 +163,10 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre /// traversal. Returns the number of children left to process. fn did_process_child(&self) -> isize; - /// Returns true if this element's style is display:none. + /// Returns true if this element's style is display:none. Panics if + /// the element has no style. fn is_display_none(&self) -> bool { let data = self.borrow_data().unwrap(); - debug_assert!(data.has_current_styles()); data.styles().is_display_none() } diff --git a/components/style/matching.rs b/components/style/matching.rs index 26b563291ba..807deeac209 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -733,7 +733,6 @@ pub trait MatchMethods : TElement { // Get our parent's style. let parent_data = parent.as_ref().map(|x| x.borrow_data().unwrap()); let parent_style = parent_data.as_ref().map(|d| { - debug_assert!(d.has_current_styles()); &d.styles().primary.values });