зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #16204 - stylo: Relax assertion that doesn't hold in layout/style/test/test_pseudoelement_state.html (from emilio:unify-note-descendants); r=emilio
It deserves more investigation, we should probably clear NAC data on ServoRestyleManager::ClearServoDataFromSubtree, but not worth to keep the tree orange meanwhile. Source-Repo: https://github.com/servo/servo Source-Revision: e69bc2e0d32ebfc88863380c4dd3418cc21dd1c3 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 10bc6b7f9316e67f0cf92b9887f061cc67d3417d
This commit is contained in:
Родитель
24a3095c04
Коммит
e3e97dceb4
|
@ -511,7 +511,17 @@ impl<'le> TElement for GeckoElement<'le> {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn note_descendants<B: DescendantsBit<Self>>(&self) {
|
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) {
|
if dom::raw_note_descendants::<Self, B>(*self) {
|
||||||
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
|
bindings::Gecko_SetOwnerDocumentNeedsStyleFlush(self.0);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче