From 14e6875ef9bcce0c2d93cc5605bba112c9c46edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 6 Mar 2019 23:01:11 +0000 Subject: [PATCH] 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 --- components/style/cbindgen.toml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/style/cbindgen.toml b/components/style/cbindgen.toml index 9b7159fcba8..5de390cc8a6 100644 --- a/components/style/cbindgen.toml +++ b/components/style/cbindgen.toml @@ -40,8 +40,13 @@ include = ["cssparser", "style_traits"] derive_eq = true derive_neq = true +[macro_expansion] +bitflags = true + [enum] derive_helper_methods = true +derive_const_casts = true +cast_assert_name = "MOZ_ASSERT" [export] prefix = "Style" @@ -133,7 +138,6 @@ item_types = ["enums", "structs", "typedefs"] """ "GenericLengthPercentageOrAuto" = """ - inline const StyleLengthPercentage& AsLengthPercentage() const; inline bool ConvertsToLength() const; inline nscoord ToLength() const; inline bool ConvertsToPercentage() const; @@ -143,8 +147,6 @@ item_types = ["enums", "structs", "typedefs"] """ "GenericSize" = """ - inline const StyleLengthPercentage& AsLengthPercentage() const; - inline StyleExtremumLength AsExtremumLength() const; inline bool ConvertsToLength() const; inline nscoord ToLength() const; inline bool ConvertsToPercentage() const; @@ -156,12 +158,9 @@ item_types = ["enums", "structs", "typedefs"] "GenericFlexBasis" = """ inline bool IsAuto() const; - inline const StyleSize& AsSize() const; """ "GenericMaxSize" = """ - inline const StyleLengthPercentage& AsLengthPercentage() const; - inline StyleExtremumLength AsExtremumLength() const; inline bool ConvertsToLength() const; inline nscoord ToLength() const; inline bool ConvertsToPercentage() const;