mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Opt into field bounds when deriving ToCss, instead of opting out
This commit is contained in:
parent
8133f788cf
commit
859002a81f
8 changed files with 89 additions and 67 deletions
|
@ -62,9 +62,9 @@ pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> {
|
|||
#[derive(Animate, Clone, ComputeSquaredDistance, Debug, MallocSizeOf, PartialEq)]
|
||||
#[derive(ToComputedValue, ToCss)]
|
||||
pub enum BasicShape<H, V, LengthOrPercentage> {
|
||||
Inset(InsetRect<LengthOrPercentage>),
|
||||
Circle(Circle<H, V, LengthOrPercentage>),
|
||||
Ellipse(Ellipse<H, V, LengthOrPercentage>),
|
||||
Inset(#[css(field_bound)] InsetRect<LengthOrPercentage>),
|
||||
Circle(#[css(field_bound)] Circle<H, V, LengthOrPercentage>),
|
||||
Ellipse(#[css(field_bound)] Ellipse<H, V, LengthOrPercentage>),
|
||||
Polygon(Polygon<LengthOrPercentage>),
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pub struct BorderImageSlice<NumberOrPercentage> {
|
|||
/// A generic value for the `border-*-radius` longhand properties.
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug)]
|
||||
#[derive(MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub struct BorderCornerRadius<L>(pub Size<L>);
|
||||
pub struct BorderCornerRadius<L>(#[css(field_bound)] pub Size<L>);
|
||||
|
||||
impl<L> BorderCornerRadius<L> {
|
||||
/// Trivially create a `BorderCornerRadius`.
|
||||
|
@ -44,7 +44,7 @@ impl<L> BorderCornerRadius<L> {
|
|||
/// A generic value for the `border-spacing` property.
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf)]
|
||||
#[derive(PartialEq, ToAnimatedValue, ToAnimatedZero, ToComputedValue, ToCss)]
|
||||
pub struct BorderSpacing<L>(pub Size<L>);
|
||||
pub struct BorderSpacing<L>(#[css(field_bound)] pub Size<L>);
|
||||
|
||||
impl<L> BorderSpacing<L> {
|
||||
/// Trivially create a `BorderCornerRadius`.
|
||||
|
|
|
@ -250,7 +250,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage>
|
|||
#[css(comma, function = "interpolatematrix")]
|
||||
InterpolateMatrix {
|
||||
#[compute(ignore_bound)]
|
||||
#[css(ignore_bound)]
|
||||
from_list: Transform<
|
||||
TransformOperation<
|
||||
Angle,
|
||||
|
@ -261,7 +260,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage>
|
|||
>,
|
||||
>,
|
||||
#[compute(ignore_bound)]
|
||||
#[css(ignore_bound)]
|
||||
to_list: Transform<
|
||||
TransformOperation<
|
||||
Angle,
|
||||
|
@ -279,7 +277,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage>
|
|||
#[css(comma, function = "accumulatematrix")]
|
||||
AccumulateMatrix {
|
||||
#[compute(ignore_bound)]
|
||||
#[css(ignore_bound)]
|
||||
from_list: Transform<
|
||||
TransformOperation<
|
||||
Angle,
|
||||
|
@ -290,7 +287,6 @@ pub enum TransformOperation<Angle, Number, Length, Integer, LengthOrPercentage>
|
|||
>,
|
||||
>,
|
||||
#[compute(ignore_bound)]
|
||||
#[css(ignore_bound)]
|
||||
to_list: Transform<
|
||||
TransformOperation<
|
||||
Angle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue