style: Relax a bit an invalid assertion.

We may end up looking at a non-flushed AuthorStyles object when looking at
whether attribute changes and such may affect style.

Check the styles are clean to preserve the assertion, since if that happens
before the first flush, we may not have updated the quirks_mode field (and
that's fine).

Bug: 1468640
MozReview-Commit-ID: FgVpiTf4qMr
This commit is contained in:
Emilio Cobos Álvarez 2018-06-16 03:21:41 -07:00
parent 7230102eba
commit 63981e962a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -178,11 +178,13 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> {
as *const bindings::RawServoAuthorStyles)
};
let author_styles = AuthorStyles::<GeckoStyleSheet>::from_ffi(author_styles);
debug_assert!(
author_styles.quirks_mode == self.as_node().owner_doc().quirks_mode() ||
author_styles.stylesheets.is_empty()
author_styles.stylesheets.is_empty() ||
author_styles.stylesheets.dirty()
);
&author_styles.data