From 9c77f0b97755fb0aa9e0b34c19aceffcab0d22fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 16 Mar 2018 22:56:05 +0100 Subject: [PATCH] style: Better Shadow DOM assertions. Bug: 1445682 Reviewed-by: xidorn Differential Revision: https://phabricator.services.mozilla.com/D748 --- components/style/gecko/wrapper.rs | 1 + components/style/stylesheet_set.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index db3188bd0bf..ace76867217 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -171,6 +171,7 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> { let author_styles = AuthorStyles::::from_ffi(author_styles); + debug_assert!(!author_styles.stylesheets.dirty()); debug_assert!( author_styles.quirks_mode == self.as_node().owner_doc().quirks_mode() || author_styles.stylesheets.is_empty() diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index fbff5501882..ab8114f422d 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -263,7 +263,7 @@ where Self { entries: vec![], data_validity: DataValidity::Valid, - dirty: true, + dirty: false, } } }