From f8346e598e3ecc4831222fd8ac7c3c0115014f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 27 Jun 2017 18:32:55 -0700 Subject: [PATCH] style: Look at XBL stylists to collect dependencies too. Bug: 1375969 Reviewed-By: heycam MozReview-Commit-ID: 72wZj6o667V --- components/style/invalidation/element/invalidator.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 5e3cd7fa3f0..ec644f5e564 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -176,6 +176,17 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E> shared_context.stylist.invalidation_map(), ); + // TODO(emilio): Consider storing dependencies from the UA sheet in + // a different map. If we do that, we can skip the stuff on the + // shared stylist iff cut_off_inheritance is true, and we can look + // just at that map. + let _cut_off_inheritance = + self.element.each_xbl_stylist(|stylist| { + collector.collect_dependencies_in_invalidation_map( + stylist.invalidation_map(), + ); + }); + collector.invalidates_self };