mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Simplify define_css_keyword_enum
This commit is contained in:
parent
3d99a4489c
commit
1fa88b8c6a
2 changed files with 33 additions and 77 deletions
|
@ -10,14 +10,20 @@ use euclid::TypedSize2D;
|
|||
#[allow(unused_imports)] use std::ascii::AsciiExt;
|
||||
use std::fmt::{self, Write};
|
||||
|
||||
define_css_keyword_enum!(UserZoom:
|
||||
"zoom" => Zoom,
|
||||
"fixed" => Fixed);
|
||||
define_css_keyword_enum! {
|
||||
pub enum UserZoom {
|
||||
Zoom = "zoom",
|
||||
Fixed = "fixed",
|
||||
}
|
||||
}
|
||||
|
||||
define_css_keyword_enum!(Orientation:
|
||||
"auto" => Auto,
|
||||
"portrait" => Portrait,
|
||||
"landscape" => Landscape);
|
||||
define_css_keyword_enum! {
|
||||
pub enum Orientation {
|
||||
Auto = "auto",
|
||||
Portrait = "portrait",
|
||||
Landscape = "landscape",
|
||||
}
|
||||
}
|
||||
|
||||
/// A set of viewport descriptors:
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue