style: Make direction use an enum class.

Differential Revision: https://phabricator.services.mozilla.com/D60857
This commit is contained in:
Emilio Cobos Álvarez 2020-01-24 11:46:14 +00:00
parent 55f76be5e2
commit 3991ab9999
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 3 additions and 2 deletions

View file

@ -563,6 +563,7 @@
Copy,
Debug,
Eq,
FromPrimitive,
Hash,
MallocSizeOf,
Parse,
@ -762,7 +763,7 @@
% endif
pub mod computed_value {
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
#[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
% if not extra_specified:
#[derive(Parse, SpecifiedValueInfo, ToComputedValue, ToShmem)]
% endif

View file

@ -43,7 +43,7 @@ ${helpers.single_keyword(
servo_2020_pref="layout.2020.unimplemented",
animation_value_type="none",
spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
needs_conversion=True,
gecko_enum_prefix="StyleDirection",
servo_restyle_damage="rebuild_and_reflow",
)}