Rollup merge of #17014 - hiikezoe:animation-rules-in-norma-restyle, r=emilio,birtles

Animation rules in norma restyle

<!-- Please describe your changes on the following line: -->

This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1366631 and https://bugzilla.mozilla.org/show_bug.cgi?id=1367225

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17014)
<!-- Reviewable:end -->
This commit is contained in:
Manish Goregaokar 2017-05-24 11:59:28 -07:00 committed by GitHub
commit a19dd8142e
8 changed files with 231 additions and 149 deletions

View file

@ -8,7 +8,7 @@ use {Atom, LocalName, Namespace};
use bit_vec::BitVec;
use context::{QuirksMode, SharedStyleContext};
use data::ComputedStyle;
use dom::{AnimationRules, TElement};
use dom::TElement;
use element_state::ElementState;
use error_reporting::RustLogReporter;
use font_metrics::FontMetricsProvider;
@ -17,9 +17,9 @@ use gecko_bindings::structs::nsIAtom;
use keyframes::KeyframesAnimation;
use media_queries::Device;
use properties::{self, CascadeFlags, ComputedValues};
use properties::{AnimationRules, PropertyDeclarationBlock};
#[cfg(feature = "servo")]
use properties::INHERIT_ALL;
use properties::PropertyDeclarationBlock;
use restyle_hints::{HintComputationContext, DependencySet, RestyleHint};
use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
use selector_map::{SelectorMap, SelectorMapEntry};
@ -944,7 +944,7 @@ impl Stylist {
if let Some(anim) = animation_rules.0 {
Push::push(
applicable_declarations,
ApplicableDeclarationBlock::from_declarations(anim,
ApplicableDeclarationBlock::from_declarations(anim.clone(),
CascadeLevel::Animations));
}
debug!("animation: {:?}", context.relations);
@ -962,7 +962,8 @@ impl Stylist {
if let Some(anim) = animation_rules.1 {
Push::push(
applicable_declarations,
ApplicableDeclarationBlock::from_declarations(anim, CascadeLevel::Transitions));
ApplicableDeclarationBlock::from_declarations(anim.clone(),
CascadeLevel::Transitions));
}
debug!("transition: {:?}", context.relations);
debug!("push_applicable_declarations: shareable: {:?}", context.relations);