mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
style: Make various border-image-* properties interpolable.
Differential Revision: https://phabricator.services.mozilla.com/D46724
This commit is contained in:
parent
877c6ac821
commit
c349dbbaa9
4 changed files with 23 additions and 4 deletions
|
@ -126,7 +126,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())",
|
initial_value="generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero())",
|
||||||
initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())",
|
initial_specified_value="generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero())",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
|
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset",
|
||||||
animation_value_type="discrete",
|
animation_value_type="NonNegativeLengthOrNumberRect",
|
||||||
boxed=True,
|
boxed=True,
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
|
initial_value="computed::BorderImageWidth::all(computed::BorderImageSideWidth::one())",
|
||||||
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
|
initial_specified_value="specified::BorderImageWidth::all(specified::BorderImageSideWidth::one())",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
|
spec="https://drafts.csswg.org/css-backgrounds/#border-image-width",
|
||||||
animation_value_type="discrete",
|
animation_value_type="BorderImageWidth",
|
||||||
boxed=True,
|
boxed=True,
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -158,6 +158,6 @@ ${helpers.predefined_type(
|
||||||
initial_value="computed::BorderImageSlice::hundred_percent()",
|
initial_value="computed::BorderImageSlice::hundred_percent()",
|
||||||
initial_specified_value="specified::BorderImageSlice::hundred_percent()",
|
initial_specified_value="specified::BorderImageSlice::hundred_percent()",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
|
spec="https://drafts.csswg.org/css-backgrounds/#border-image-slice",
|
||||||
animation_value_type="discrete",
|
animation_value_type="BorderImageSlice",
|
||||||
boxed=True,
|
boxed=True,
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -577,7 +577,16 @@ impl From<GreaterThanOrEqualToOneNumber> for CSSFloat {
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue,
|
Animate,
|
||||||
|
Clone,
|
||||||
|
ComputeSquaredDistance,
|
||||||
|
Copy,
|
||||||
|
Debug,
|
||||||
|
MallocSizeOf,
|
||||||
|
PartialEq,
|
||||||
|
ToAnimatedZero,
|
||||||
|
ToCss,
|
||||||
|
ToResolvedValue,
|
||||||
)]
|
)]
|
||||||
#[repr(C, u8)]
|
#[repr(C, u8)]
|
||||||
pub enum NumberOrPercentage {
|
pub enum NumberOrPercentage {
|
||||||
|
|
|
@ -12,13 +12,17 @@ use style_traits::{CssWriter, ToCss};
|
||||||
|
|
||||||
/// A generic value for a single side of a `border-image-width` property.
|
/// A generic value for a single side of a `border-image-width` property.
|
||||||
#[derive(
|
#[derive(
|
||||||
|
Animate,
|
||||||
Clone,
|
Clone,
|
||||||
|
ComputeSquaredDistance,
|
||||||
Copy,
|
Copy,
|
||||||
Debug,
|
Debug,
|
||||||
MallocSizeOf,
|
MallocSizeOf,
|
||||||
Parse,
|
Parse,
|
||||||
PartialEq,
|
PartialEq,
|
||||||
SpecifiedValueInfo,
|
SpecifiedValueInfo,
|
||||||
|
ToAnimatedValue,
|
||||||
|
ToAnimatedZero,
|
||||||
ToComputedValue,
|
ToComputedValue,
|
||||||
ToCss,
|
ToCss,
|
||||||
ToResolvedValue,
|
ToResolvedValue,
|
||||||
|
@ -41,12 +45,16 @@ pub use self::GenericBorderImageSideWidth as BorderImageSideWidth;
|
||||||
|
|
||||||
/// A generic value for the `border-image-slice` property.
|
/// A generic value for the `border-image-slice` property.
|
||||||
#[derive(
|
#[derive(
|
||||||
|
Animate,
|
||||||
Clone,
|
Clone,
|
||||||
|
ComputeSquaredDistance,
|
||||||
Copy,
|
Copy,
|
||||||
Debug,
|
Debug,
|
||||||
MallocSizeOf,
|
MallocSizeOf,
|
||||||
PartialEq,
|
PartialEq,
|
||||||
SpecifiedValueInfo,
|
SpecifiedValueInfo,
|
||||||
|
ToAnimatedValue,
|
||||||
|
ToAnimatedZero,
|
||||||
ToComputedValue,
|
ToComputedValue,
|
||||||
ToCss,
|
ToCss,
|
||||||
ToResolvedValue,
|
ToResolvedValue,
|
||||||
|
@ -58,6 +66,7 @@ pub struct GenericBorderImageSlice<NumberOrPercentage> {
|
||||||
#[css(field_bound)]
|
#[css(field_bound)]
|
||||||
pub offsets: Rect<NumberOrPercentage>,
|
pub offsets: Rect<NumberOrPercentage>,
|
||||||
/// Whether to fill the middle part.
|
/// Whether to fill the middle part.
|
||||||
|
#[animation(constant)]
|
||||||
#[css(represents_keyword)]
|
#[css(represents_keyword)]
|
||||||
pub fill: bool,
|
pub fill: bool,
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ use style_traits::{CssWriter, ParseError, ToCss};
|
||||||
PartialEq,
|
PartialEq,
|
||||||
SpecifiedValueInfo,
|
SpecifiedValueInfo,
|
||||||
ToAnimatedValue,
|
ToAnimatedValue,
|
||||||
|
ToAnimatedZero,
|
||||||
ToComputedValue,
|
ToComputedValue,
|
||||||
ToResolvedValue,
|
ToResolvedValue,
|
||||||
ToShmem,
|
ToShmem,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue