From 2639916d7d53204281bd456abc44140de21a7740 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Thu, 22 Nov 2018 04:03:06 +0000 Subject: [PATCH] style: Set the important rule change flag when a newly important rule is inserted. Without this change an assertion checking IsInStyleRefresh() in EffectCompositor::PostRestyleForAnimation will be hit when we call FindAnimationsForCompositor from RestyleManager::DoProcessPendingRestyles that will be introduced in a subsequent commit in this series. I wrote a crash test which causes an assertion in KeyframeEffect::CanThrottle() without the subsequent commit, but we need more work in display item stuff to make the assertion won't happen (bug 1508466). Differential Revision: https://phabricator.services.mozilla.com/D12368 --- components/style/rule_tree/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index fdd563d23721..a2caba6f9f7a 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -453,6 +453,7 @@ impl RuleTree { StyleSource::from_declarations(pdb.clone_arc()), level, ); + *important_rules_changed = true; } } else { if pdb.read_with(level.guard(guards)).any_normal() {