Auto merge of #16204 - emilio:unify-note-descendants, r=emilio

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.
This commit is contained in:
bors-servo 2017-03-31 09:05:32 -05:00 committed by GitHub
commit e69bc2e0d3

View file

@ -511,7 +511,17 @@ impl<'le> TElement for GeckoElement<'le> {
}
unsafe fn note_descendants<B: DescendantsBit<Self>>(&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, B>(*self) {
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
}