From 4e356b4bb9b66c8a91153e66c683ac9331664fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 17 Oct 2018 13:37:47 +0000 Subject: [PATCH] style: Clear host rules from clear_cascade_data. While at it, also measure them for about:memory. Differential Revision: https://phabricator.services.mozilla.com/D8972 --- components/style/stylist.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index e5249a52b8f..fe96fd78ad8 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -2415,6 +2415,9 @@ impl CascadeData { if let Some(ref mut slotted_rules) = self.slotted_rules { slotted_rules.clear(); } + if let Some(ref mut host_rules) = self.host_rules { + host_rules.clear(); + } self.animations.clear(); self.extra_data.clear(); self.rules_source_order = 0; @@ -2440,6 +2443,9 @@ impl CascadeData { if let Some(ref slotted_rules) = self.slotted_rules { slotted_rules.add_size_of(ops, sizes); } + if let Some(ref host_rules) = self.host_rules { + host_rules.add_size_of(ops, sizes); + } sizes.mInvalidationMap += self.invalidation_map.size_of(ops); sizes.mRevalidationSelectors += self.selectors_for_cache_revalidation.size_of(ops); sizes.mOther += self.animations.size_of(ops);