mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +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
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue