From cdbb2c5d0dfbe8c5c014943d83b51f7ed4f50a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 31 Mar 2017 15:59:37 +0200 Subject: [PATCH] stylo: Relax assertion that doesn't hold in layout/style/test/test_pseudoelement_state.html It deserves more investigation, we should probably clear NAC data on ServoRestyleManager::ClearServoDataFromSubtree, but not worth to keep the tree orange meanwhile. --- components/style/gecko/wrapper.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 3ec34e89927..b124307a873 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -510,7 +510,17 @@ impl<'le> TElement for GeckoElement<'le> { } unsafe fn note_descendants>(&self) { - debug_assert!(self.get_data().is_some()); + // FIXME(emilio): We seem to reach this in Gecko's + // layout/style/test/test_pseudoelement_state.html, while changing the + // state of an anonymous content element which is styled, but whose + // parent isn't, presumably because we've cleared the data and haven't + // reached it yet. + // + // Otherwise we should be able to assert this. + if self.get_data().is_none() { + return; + } + if dom::raw_note_descendants::(*self) { bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0); }