mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Cleanup most of the Inner mess.
MozReview-Commit-ID: Ieg2GJT0yUl
This commit is contained in:
parent
b113d54987
commit
655c842d2e
13 changed files with 289 additions and 221 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue