mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Remove the ComputedValue traits and style_struct_traits
This commit is contained in:
parent
b2a7e44373
commit
789807b7b0
60 changed files with 589 additions and 652 deletions
|
@ -24,10 +24,9 @@ use properties::longhands::transform_origin::computed_value::T as TransformOrigi
|
|||
use properties::longhands::vertical_align::computed_value::T as VerticalAlign;
|
||||
use properties::longhands::visibility::computed_value::T as Visibility;
|
||||
use properties::longhands::z_index::computed_value::T as ZIndex;
|
||||
use properties::style_struct_traits::*;
|
||||
use std::cmp;
|
||||
use std::fmt;
|
||||
use super::ComputedValues;
|
||||
use super::ComputedValuesStruct;
|
||||
use values::computed::{Angle, LengthOrPercentageOrAuto, LengthOrPercentageOrNone};
|
||||
use values::computed::{BorderRadiusSize, LengthOrNone};
|
||||
use values::computed::{CalcLengthOrPercentage, LengthOrPercentage};
|
||||
|
@ -115,7 +114,7 @@ impl AnimatedProperty {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn update<C: ComputedValues>(&self, style: &mut C, progress: f64) {
|
||||
pub fn update(&self, style: &mut ComputedValuesStruct, progress: f64) {
|
||||
match *self {
|
||||
% for prop in data.longhands:
|
||||
% if prop.animatable:
|
||||
|
@ -129,9 +128,10 @@ impl AnimatedProperty {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn from_transition_property<C: ComputedValues>(transition_property: &TransitionProperty,
|
||||
old_style: &C,
|
||||
new_style: &C) -> AnimatedProperty {
|
||||
pub fn from_transition_property(transition_property: &TransitionProperty,
|
||||
old_style: &ComputedValuesStruct,
|
||||
new_style: &ComputedValuesStruct)
|
||||
-> AnimatedProperty {
|
||||
match *transition_property {
|
||||
TransitionProperty::All => panic!("Can't use TransitionProperty::All here."),
|
||||
% for prop in data.longhands:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue