@@ -16,6 +16,7 @@ use context::{CurrentElementInfo, SelectorFlagsMap, SharedStyleContext, StyleCon
16
16
use data:: { ComputedStyle , ElementData , ElementStyles , RestyleData } ;
17
17
use dom:: { AnimationRules , SendElement , TElement , TNode } ;
18
18
use font_metrics:: FontMetricsProvider ;
19
+ use log:: LogLevel :: Trace ;
19
20
use properties:: { CascadeFlags , ComputedValues , SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP , cascade} ;
20
21
use properties:: longhands:: display:: computed_value as display;
21
22
use restyle_hints:: { RESTYLE_CSS_ANIMATIONS , RESTYLE_CSS_TRANSITIONS , RestyleHint } ;
@@ -1163,10 +1164,22 @@ pub trait MatchMethods : TElement {
1163
1164
& mut applicable_declarations,
1164
1165
& context. shared . guards ) ;
1165
1166
1166
- let important_rules_changed = self . has_animations ( ) &&
1167
- data. has_styles ( ) &&
1168
- data. important_rules_are_different ( & primary_rule_node,
1169
- & context. shared . guards ) ;
1167
+ if log_enabled ! ( Trace ) {
1168
+ trace ! ( "Matched rules:" ) ;
1169
+ for rn in primary_rule_node. self_and_ancestors ( ) {
1170
+ if let Some ( source) = rn. style_source ( ) {
1171
+ trace ! ( " > {:?}" , source) ;
1172
+ }
1173
+ }
1174
+ }
1175
+
1176
+ let important_rules_changed =
1177
+ self . has_animations ( ) &&
1178
+ data. has_styles ( ) &&
1179
+ data. important_rules_are_different (
1180
+ & primary_rule_node,
1181
+ & context. shared . guards
1182
+ ) ;
1170
1183
1171
1184
RulesMatchedResult {
1172
1185
rule_nodes_changed : data. set_primary_rules ( primary_rule_node) ,
0 commit comments