2 # User Simon Sapin <simon.sapin@exyr.org>
3 # Date 1547211824 -3600
4 # Node ID f63ebd7e9e281f22e71c268151337178de2c246a
5 # Parent 4f2e84dc490dbbac2a35799b6b9230c105f2cd35
6 Bug 1519729 - Document public macros. r=emilio
8 Undocumented public macros emit warnings in nightly-2019-01-11,
9 and we #![deny] that warning.
11 Cherry-picks a commit from https://github.com/servo/servo/pull/22674
14 diff --git a/servo/components/style/properties/properties.mako.rs b/servo/components/style/properties/properties.mako.rs
15 --- a/servo/components/style/properties/properties.mako.rs
16 +++ b/servo/components/style/properties/properties.mako.rs
17 @@ -3816,17 +3816,24 @@ impl AliasId {
18 % for property in data.all_aliases():
19 AliasId::${property.camel_case} => "${property.camel_case}",
22 formatter.write_str(name)
26 -// NOTE(emilio): Callers are responsible to deal with prefs.
27 +/// Call the given macro with tokens like this for each longhand and shorthand properties
28 +/// that is enabled in content:
31 +/// [CamelCaseName, SetCamelCaseName, PropertyId::Longhand(LonghandId::CamelCaseName)],
34 +/// NOTE(emilio): Callers are responsible to deal with prefs.
36 macro_rules! css_properties_accessors {
37 ($macro_name: ident) => {
39 % for kind, props in [("Longhand", data.longhands), ("Shorthand", data.shorthands)]:
40 % for property in props:
41 % if property.enabled_in_content():
42 % for name in [property.name] + property.alias:
43 @@ -3839,16 +3846,24 @@ macro_rules! css_properties_accessors {
52 +/// Call the given macro with tokens like this for each longhand properties:
55 +/// { snake_case_ident, true }
58 +/// … where the boolean indicates whether the property value type
59 +/// is wrapped in a `Box<_>` in the corresponding `PropertyDeclaration` variant.
61 macro_rules! longhand_properties_idents {
62 ($macro_name: ident) => {
64 % for property in data.longhands:
65 { ${property.ident}, ${"true" if property.boxed else "false"} }
69 # User Emilio Cobos Álvarez <emilio@crisal.io>
70 # Date 1547412158 -3600
71 # Node ID 1a1d8b9f1a3ab704ab277407823f6f42dd63a3d4
72 # Parent a2f691714d70fa6a9119503270809fa0eb8df6c6
73 Bug 1519629 - Document a few more macros.
76 --- firefox-60.6.1/servo/components/style/properties/properties.mako.rs.orig 2019-03-22 06:01:07.000000000 +0100
77 +++ firefox-60.6.1/servo/components/style/properties/properties.mako.rs 2019-04-14 12:19:55.687706977 +0200
80 pub use self::declaration_block::*;
83 #[cfg(feature = "gecko")]
85 macro_rules! property_name {
86 --- firefox-60.8.0/servo/components/style_traits/values.rs.orig 2019-07-09 22:38:09.837119875 +0200
87 +++ firefox-60.8.0/servo/components/style_traits/values.rs 2019-07-09 22:40:59.863527104 +0200
94 macro_rules! serialize_function {
95 ($dest: expr, $name: ident($( $arg: expr, )+)) => {
97 impl_to_css_for_predefined_type!(::cssparser::Color);
98 impl_to_css_for_predefined_type!(::cssparser::UnicodeRange);
102 macro_rules! define_css_keyword_enum {
103 (pub enum $name:ident { $($variant:ident = $css:expr,)+ }) => {