style: Use more cbindgen features.

We can get back the fancy flag syntax as soon as we get C++17 inline variables,
which I sent an email to dev-platform@ about, with no reply.

Differential Revision: https://phabricator.services.mozilla.com/D22382
This commit is contained in:
Emilio Cobos Álvarez 2019-03-06 23:01:11 +00:00
parent e0b3e5f691
commit 14e6875ef9

View file

@ -40,8 +40,13 @@ include = ["cssparser", "style_traits"]
derive_eq = true derive_eq = true
derive_neq = true derive_neq = true
[macro_expansion]
bitflags = true
[enum] [enum]
derive_helper_methods = true derive_helper_methods = true
derive_const_casts = true
cast_assert_name = "MOZ_ASSERT"
[export] [export]
prefix = "Style" prefix = "Style"
@ -133,7 +138,6 @@ item_types = ["enums", "structs", "typedefs"]
""" """
"GenericLengthPercentageOrAuto" = """ "GenericLengthPercentageOrAuto" = """
inline const StyleLengthPercentage& AsLengthPercentage() const;
inline bool ConvertsToLength() const; inline bool ConvertsToLength() const;
inline nscoord ToLength() const; inline nscoord ToLength() const;
inline bool ConvertsToPercentage() const; inline bool ConvertsToPercentage() const;
@ -143,8 +147,6 @@ item_types = ["enums", "structs", "typedefs"]
""" """
"GenericSize" = """ "GenericSize" = """
inline const StyleLengthPercentage& AsLengthPercentage() const;
inline StyleExtremumLength AsExtremumLength() const;
inline bool ConvertsToLength() const; inline bool ConvertsToLength() const;
inline nscoord ToLength() const; inline nscoord ToLength() const;
inline bool ConvertsToPercentage() const; inline bool ConvertsToPercentage() const;
@ -156,12 +158,9 @@ item_types = ["enums", "structs", "typedefs"]
"GenericFlexBasis" = """ "GenericFlexBasis" = """
inline bool IsAuto() const; inline bool IsAuto() const;
inline const StyleSize& AsSize() const;
""" """
"GenericMaxSize" = """ "GenericMaxSize" = """
inline const StyleLengthPercentage& AsLengthPercentage() const;
inline StyleExtremumLength AsExtremumLength() const;
inline bool ConvertsToLength() const; inline bool ConvertsToLength() const;
inline nscoord ToLength() const; inline nscoord ToLength() const;
inline bool ConvertsToPercentage() const; inline bool ConvertsToPercentage() const;