mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
style: Simplify some conversion code used for mapped attributes.
These days for the types we share computed value representation we don't really need any special code. Differential Revision: https://phabricator.services.mozilla.com/D17763
This commit is contained in:
parent
45a416b996
commit
76ea22d50c
3 changed files with 3 additions and 11 deletions
|
@ -61,15 +61,6 @@
|
||||||
)}
|
)}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
${helpers.gecko_keyword_conversion(
|
|
||||||
Keyword('border-style',
|
|
||||||
"none solid double dotted dashed hidden groove ridge inset outset",
|
|
||||||
gecko_enum_prefix="StyleBorderStyle",
|
|
||||||
gecko_inexhaustive=True),
|
|
||||||
type="crate::values::specified::BorderStyle",
|
|
||||||
)}
|
|
||||||
|
|
||||||
// FIXME(#4126): when gfx supports painting it, make this Size2D<LengthPercentage>
|
|
||||||
% for corner in ALL_CORNERS:
|
% for corner in ALL_CORNERS:
|
||||||
<%
|
<%
|
||||||
corner_name = corner[0]
|
corner_name = corner[0]
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub type Perspective = GenericPerspective<NonNegativeLength>;
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
|
Clone, Copy, Debug, Eq, FromPrimitive, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
|
||||||
)]
|
)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
/// A computed value for the `float` property.
|
/// A computed value for the `float` property.
|
||||||
|
@ -97,7 +97,7 @@ impl ToComputedValue for SpecifiedFloat {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
|
Clone, Copy, Debug, Eq, FromPrimitive, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss,
|
||||||
)]
|
)]
|
||||||
/// A computed value for the `clear` property.
|
/// A computed value for the `clear` property.
|
||||||
pub enum Clear {
|
pub enum Clear {
|
||||||
|
|
|
@ -30,6 +30,7 @@ use style_traits::{CssWriter, ParseError, ToCss};
|
||||||
Copy,
|
Copy,
|
||||||
Debug,
|
Debug,
|
||||||
Eq,
|
Eq,
|
||||||
|
FromPrimitive,
|
||||||
MallocSizeOf,
|
MallocSizeOf,
|
||||||
Ord,
|
Ord,
|
||||||
Parse,
|
Parse,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue