mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add some attributes for SpecifiedValueInfo to help deriving more from types.
Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: IyohSTbUO31
This commit is contained in:
parent
0021c70c08
commit
0f7f9eebc0
17 changed files with 137 additions and 36 deletions
|
@ -80,7 +80,9 @@ pub struct TransformOrigin<H, V, Depth> {
|
|||
/// A generic timing function.
|
||||
///
|
||||
/// <https://drafts.csswg.org/css-timing-1/#single-timing-function-production>
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToCss)]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToCss)]
|
||||
#[value_info(ty = "TIMING_FUNCTION")]
|
||||
pub enum TimingFunction<Integer, Number> {
|
||||
/// `linear | ease | ease-in | ease-out | ease-in-out`
|
||||
Keyword(TimingKeyword),
|
||||
|
@ -95,6 +97,7 @@ pub enum TimingFunction<Integer, Number> {
|
|||
},
|
||||
/// `step-start | step-end | steps(<integer>, [ start | end ]?)`
|
||||
#[css(comma, function)]
|
||||
#[value_info(other_values = "step-start,step-end")]
|
||||
Steps(Integer, #[css(skip_if = "is_end")] StepPosition),
|
||||
/// `frames(<integer>)`
|
||||
#[css(comma, function)]
|
||||
|
@ -103,7 +106,8 @@ pub enum TimingFunction<Integer, Number> {
|
|||
|
||||
#[allow(missing_docs)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq,
|
||||
SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
pub enum TimingKeyword {
|
||||
Linear,
|
||||
Ease,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue