|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #include "nsMemory.h" |
|
7 #include "nsStaticAtom.h" |
|
8 #include "nsEditProperty.h" |
|
9 |
|
10 using namespace mozilla; |
|
11 |
|
12 #define EDITOR_ATOM(name_, value_) nsIAtom* nsEditProperty::name_ = 0; |
|
13 #include "nsEditPropertyAtomList.h" // IWYU pragma: keep |
|
14 #undef EDITOR_ATOM |
|
15 |
|
16 /* From the HTML 4.0 DTD, |
|
17 |
|
18 INLINE: |
|
19 <!-- %inline; covers inline or "text-level" elements --> |
|
20 <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> |
|
21 <!ENTITY % fontstyle "TT | I | B | BIG | SMALL"> |
|
22 <!ENTITY % phrase "EM | STRONG | DFN | CODE | |
|
23 SAMP | KBD | VAR | CITE | ABBR | ACRONYM" > |
|
24 <!ENTITY % special |
|
25 "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO"> |
|
26 <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> |
|
27 |
|
28 BLOCK: |
|
29 <!ENTITY % block |
|
30 "P | %heading (h1-h6); | %list (UL | OL); | %preformatted (PRE); | DL | DIV | NOSCRIPT | |
|
31 BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> |
|
32 |
|
33 But what about BODY, TR, TD, TH, CAPTION, COL, COLGROUP, THEAD, TFOOT, LI, DT, DD, LEGEND, etc.? |
|
34 |
|
35 |
|
36 */ |
|
37 |
|
38 #define EDITOR_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_) |
|
39 #include "nsEditPropertyAtomList.h" // IWYU pragma: keep |
|
40 #undef EDITOR_ATOM |
|
41 |
|
42 void |
|
43 nsEditProperty::RegisterAtoms() |
|
44 { |
|
45 // inline tags |
|
46 static const nsStaticAtom property_atoms[] = { |
|
47 #define EDITOR_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &name_), |
|
48 #include "nsEditPropertyAtomList.h" // IWYU pragma: keep |
|
49 #undef EDITOR_ATOM |
|
50 }; |
|
51 |
|
52 NS_RegisterStaticAtoms(property_atoms); |
|
53 } |