style: Cleanup most of the Inner mess.

MozReview-Commit-ID: Ieg2GJT0yUl
This commit is contained in:
Emilio Cobos Álvarez 2017-07-18 12:51:57 +02:00
parent b113d54987
commit 655c842d2e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
13 changed files with 289 additions and 221 deletions

View file

@ -11,7 +11,7 @@ use context::SharedStyleContext;
use dom::OpaqueNode;
use euclid::Point2D;
use font_metrics::FontMetricsProvider;
use properties::{self, CascadeFlags, ComputedValues, ComputedValuesInner, Importance};
use properties::{self, CascadeFlags, ComputedValues, Importance};
use properties::animated_properties::{AnimatableLonghand, AnimatedProperty, TransitionProperty};
use properties::longhands::animation_direction::computed_value::single_value::T as AnimationDirection;
use properties::longhands::animation_iteration_count::single_value::computed_value::T as AnimationIterationCount;
@ -347,8 +347,8 @@ impl PropertyAnimation {
fn from_animatable_longhand(animatable_longhand: &AnimatableLonghand,
timing_function: TimingFunction,
duration: Time,
old_style: &ComputedValuesInner,
new_style: &ComputedValuesInner)
old_style: &ComputedValues,
new_style: &ComputedValues)
-> Option<PropertyAnimation> {
let animated_property = AnimatedProperty::from_animatable_longhand(animatable_longhand,
old_style,
@ -480,10 +480,10 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Sender<Animation>
fn compute_style_for_animation_step(context: &SharedStyleContext,
step: &KeyframesStep,
previous_style: &ComputedValuesInner,
style_from_cascade: &ComputedValuesInner,
previous_style: &ComputedValues,
style_from_cascade: &Arc<ComputedValues>,
font_metrics_provider: &FontMetricsProvider)
-> ComputedValuesInner {
-> Arc<ComputedValues> {
match step.value {
KeyframesStepValue::ComputedValues => style_from_cascade.clone(),
KeyframesStepValue::Declarations { block: ref declarations } => {
@ -502,10 +502,11 @@ fn compute_style_for_animation_step(context: &SharedStyleContext,
// as existing browsers don't appear to animate visited styles.
let computed =
properties::apply_declarations(context.stylist.device(),
/* pseudo = */ None,
previous_style.rules(),
iter,
previous_style,
previous_style,
Some(previous_style),
Some(previous_style),
/* cascade_info = */ None,
/* visited_style = */ None,
font_metrics_provider,