Bug 1382138 - Part 1: Make -moz-appearance animatable. r?hiro
MozReview-Commit-ID: DDT9IWcevZB
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -464,17 +464,20 @@ def set_gecko_property(ffi_name, expr):
${set_gecko_property(gecko_ffi_name, "result")}
% if on_set:
self.${on_set}();
% endif
}
</%def>
<%def name="impl_keyword_clone(ident, gecko_ffi_name, keyword, cast_type='u8')">
- #[allow(non_snake_case)]
+ // FIXME: We introduced non_upper_case_globals for -moz-appearance only
+ // since the prefix of Gecko value starts with ThemeWidgetType_NS_THEME.
+ // We should remove this after fix bug 1371809.
+ #[allow(non_snake_case, non_upper_case_globals)]
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
use properties::longhands::${ident}::computed_value::T as Keyword;
// FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
// Some constant macros in the gecko are defined as negative integer(e.g. font-stretch).
// And they are convert to signed integer in Rust bindings. We need to cast then
// as signed type when we have both signed/unsigned integer in order to use them
// as match's arms.
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -1818,17 +1818,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)")}