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 diff --git a/servo/components/style/gecko/regen_atoms.py b/servo/components/style/gecko/regen_atoms.py
77 --- a/servo/components/style/gecko/regen_atoms.py
78 +++ b/servo/components/style/gecko/regen_atoms.py
79 @@ -125,16 +125,17 @@ PRELUDE = '''
80 RULE_TEMPLATE = ('("{atom}") =>\n '
82 '#[allow(unsafe_code)] #[allow(unused_unsafe)]'
83 'unsafe {{ $crate::string_cache::atom_macro::atom_from_static'
84 '($crate::string_cache::atom_macro::{name} as *mut _) }}'
88 +/// Returns a static atom by passing the literal string it represents.
96 def write_atom_macro(atoms, file_name):
97 --- firefox-60.6.1/servo/components/style/properties/properties.mako.rs.orig 2019-03-22 06:01:07.000000000 +0100
98 +++ firefox-60.6.1/servo/components/style/properties/properties.mako.rs 2019-04-14 12:19:55.687706977 +0200
101 pub use self::declaration_block::*;
104 #[cfg(feature = "gecko")]
106 macro_rules! property_name {