Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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/. */
6 #include "nsMemory.h"
7 #include "nsStaticAtom.h"
8 #include "nsEditProperty.h"
10 using namespace mozilla;
12 #define EDITOR_ATOM(name_, value_) nsIAtom* nsEditProperty::name_ = 0;
13 #include "nsEditPropertyAtomList.h" // IWYU pragma: keep
14 #undef EDITOR_ATOM
16 /* From the HTML 4.0 DTD,
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">
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">
33 But what about BODY, TR, TD, TH, CAPTION, COL, COLGROUP, THEAD, TFOOT, LI, DT, DD, LEGEND, etc.?
36 */
38 #define EDITOR_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
39 #include "nsEditPropertyAtomList.h" // IWYU pragma: keep
40 #undef EDITOR_ATOM
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 };
52 NS_RegisterStaticAtoms(property_atoms);
53 }