@@ -39,7 +39,7 @@ class CSSPseudoElementsAtomSource:
39
39
class CSSAnonBoxesAtomSource :
40
40
PATTERN = re .compile ('^CSS_ANON_BOX\((.+),\s*"(.*)"\)' )
41
41
FILE = "dist/include/nsCSSAnonBoxList.h"
42
- CLASS = "nsGKAtoms "
42
+ CLASS = "nsCSSAnonBoxes "
43
43
TYPE = "nsICSSAnonBoxPseudo"
44
44
45
45
@staticmethod
@@ -168,34 +168,35 @@ def write_items(f, func):
168
168
* ```
169
169
* fn have_to_use_pseudo_elements() {
170
170
* macro_rules pseudo_element! {
171
- * ($pseudo_str_with_colon:expr, $pseudo_atom:expr, $is_anon_box:true) => {
171
+ * ($pseudo_str_with_colon:expr, $pseudo_atom:expr, $is_anon_box:true) => {{
172
172
* // Stuff stuff stuff.
173
- * }
173
+ * }}
174
174
* }
175
175
* include!("path/to/helper.rs")
176
176
* }
177
177
* ```
178
+ *
178
179
*/
179
180
"""
180
181
181
182
PSEUDO_ELEMENT_MACRO_INVOCATION = """
182
- pseudo_element!(\" {}\" ,
183
- atom!(\" {}\" ),
184
- {});
185
- """ . strip ()
183
+ pseudo_element!(\" {}\" ,
184
+ atom!(\" {}\" ),
185
+ {});
186
+ """ [ 1 :]
186
187
187
188
188
189
def write_pseudo_element_helper (atoms , target_filename ):
189
190
with open (target_filename , "wb" ) as f :
190
191
f .write (PRELUDE )
191
192
f .write (PSEUDO_ELEMENT_HEADER )
193
+ f .write ("{\n " )
192
194
for atom in atoms :
193
195
if atom .get_type () == "nsICSSPseudoElement" :
194
196
f .write (PSEUDO_ELEMENT_MACRO_INVOCATION .format (atom .value , atom .value , "false" ))
195
- f .write ("\n " )
196
197
elif atom .get_type () == "nsICSSAnonBoxPseudo" :
197
198
f .write (PSEUDO_ELEMENT_MACRO_INVOCATION .format (atom .value , atom .value , "true" ))
198
- f .write ("\n " )
199
+ f .write ("} \n " )
199
200
200
201
201
202
def build (objdir , verbose = False ):
0 commit comments