From 63981e962a528cca34456797528b816f68f174e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 16 Jun 2018 03:21:41 -0700 Subject: [PATCH] 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 --- components/style/gecko/wrapper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 5475be1e3fc..0ce4a45d175 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -178,11 +178,13 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> { as *const bindings::RawServoAuthorStyles) }; + let author_styles = AuthorStyles::::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