mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Don't use define_css_keyword_enum in style anymore
This commit is contained in:
parent
09e304adb3
commit
3d99a4489c
14 changed files with 174 additions and 158 deletions
|
@ -279,12 +279,14 @@ ${helpers.predefined_type(
|
|||
}
|
||||
}
|
||||
|
||||
define_css_keyword_enum!(ShapeKeyword:
|
||||
"dot" => Dot,
|
||||
"circle" => Circle,
|
||||
"double-circle" => DoubleCircle,
|
||||
"triangle" => Triangle,
|
||||
"sesame" => Sesame);
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq, ToCss)]
|
||||
pub enum ShapeKeyword {
|
||||
Dot,
|
||||
Circle,
|
||||
DoubleCircle,
|
||||
Triangle,
|
||||
Sesame,
|
||||
}
|
||||
|
||||
impl ShapeKeyword {
|
||||
pub fn char(&self, fill: bool) -> &str {
|
||||
|
@ -381,14 +383,19 @@ ${helpers.predefined_type(
|
|||
|
||||
<%helpers:longhand name="text-emphasis-position" animation_value_type="discrete" products="gecko"
|
||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-position">
|
||||
define_css_keyword_enum!(HorizontalWritingModeValue:
|
||||
"over" => Over,
|
||||
"under" => Under);
|
||||
add_impls_for_keyword_enum!(VerticalWritingModeValue);
|
||||
define_css_keyword_enum!(VerticalWritingModeValue:
|
||||
"right" => Right,
|
||||
"left" => Left);
|
||||
add_impls_for_keyword_enum!(HorizontalWritingModeValue);
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq)]
|
||||
#[derive(ToComputedValue, ToCss)]
|
||||
pub enum HorizontalWritingModeValue {
|
||||
Over,
|
||||
Under,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq)]
|
||||
#[derive(ToComputedValue, ToCss)]
|
||||
pub enum VerticalWritingModeValue {
|
||||
Right,
|
||||
Left,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub struct SpecifiedValue(pub HorizontalWritingModeValue, pub VerticalWritingModeValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue