Bug 1378076 - Part 6: make -moz-appearance property animatable. r?hiro
In this patch, make following properties animatable.
* -moz-appearance
To realize this, we address for non_upper_case_globals rule of Rust since the
prefix of Gecko filed is ThemeWidgetType_NS_THEME.
Actually, we can think two ways to fix.
1. Add #[arrow(non_upper_case_globals)] attribute.
2. Force to change to upper case.
In this time, we use 2 since don't want to use such the attribute for the
coding style consistency even generated code.
MozReview-Commit-ID: 1zauxWzomLt
--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -128,17 +128,17 @@ class Keyword(object):
def maybe_cast(self, type_str):
return "as " + type_str if self.needs_cast() else ""
def casted_constant_name(self, value, cast_type):
if cast_type is None:
raise TypeError("We should specify the cast_type.")
if self.gecko_enum_prefix is None:
- return cast_type.upper() + "_" + self.gecko_constant(value)
+ return cast_type.upper() + "_" + self.gecko_constant(value).upper()
else:
return cast_type.upper() + "_" + self.gecko_constant(value).upper().replace("::", "_")
def arg_to_bool(arg):
if isinstance(arg, bool):
return arg
assert arg in ["True", "False"]
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -1848,17 +1848,17 @@
-moz-window-button-maximize -moz-window-button-minimize -moz-window-button-restore
-moz-window-frame-bottom -moz-window-frame-left -moz-window-frame-right -moz-window-titlebar
-moz-window-titlebar-maximized
""",
gecko_ffi_name="mAppearance",
gecko_constant_prefix="ThemeWidgetType_NS_THEME",
products="gecko",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance)",
- animation_value_type="none")}
+ animation_value_type="discrete")}
${helpers.predefined_type("-moz-binding", "UrlOrNone", "Either::Second(None_)",
products="gecko",
boxed="True" if product == "gecko" else "False",
animation_value_type="none",
gecko_ffi_name="mBinding",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-binding)",
disable_when_testing="True")}