style: Split collect_style_attribute_and_animation_rules.

Animations are their own cascade level per https://drafts.csswg.org/css-cascade-4/#cascade-origin

Differential Revision: https://phabricator.services.mozilla.com/D52575
This commit is contained in:
Emilio Cobos Álvarez 2019-11-13 09:58:52 +00:00
parent 9bdad610ff
commit 28110c060f
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -377,7 +377,7 @@ where
}
}
fn collect_style_attribute_and_animation_rules(&mut self) {
fn collect_style_attribute(&mut self) {
if let Some(sa) = self.style_attribute {
self.rules
.push(ApplicableDeclarationBlock::from_declarations(
@ -385,7 +385,9 @@ where
CascadeLevel::StyleAttributeNormal,
));
}
}
fn collect_animation_rules(&mut self) {
if let Some(so) = self.smil_override {
self.rules
.push(ApplicableDeclarationBlock::from_declarations(
@ -436,6 +438,7 @@ where
self.collect_normal_rules_from_containing_shadow_tree();
self.collect_document_author_rules();
self.collect_part_rules();
self.collect_style_attribute_and_animation_rules();
self.collect_style_attribute();
self.collect_animation_rules();
}
}