style: Rust side plumbing work for linear easing function

Add LinearFunction to TimingFunction. Because the linear function is a
variable list of linear stops, the enum is no longer Copyable.

Differential Revision: https://phabricator.services.mozilla.com/D146837
This commit is contained in:
David Shin 2022-06-07 11:51:24 +00:00 committed by Martin Robinson
parent 898cafb5a5
commit 6326a384a8
6 changed files with 81 additions and 25 deletions

View file

@ -4,11 +4,14 @@
//! Computed types for CSS Easing functions.
use crate::values::computed::{Integer, Number};
use crate::values::computed::{Integer, Number, Percentage};
use crate::values::generics::easing;
/// A computed timing function.
pub type ComputedTimingFunction = easing::TimingFunction<Integer, Number>;
pub type ComputedTimingFunction = easing::TimingFunction<Integer, Number, Percentage>;
/// An alias of the computed timing function.
pub type TimingFunction = ComputedTimingFunction;
/// A computed linear easing entry.
pub type ComputedLinearStop = easing::LinearStop<Number, Percentage>;