forked from mirrors/gecko-dev
Bug 1858446 - Document that classes representing HTML elements should live in the mozilla::dom namespace. r=peterv DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D210576
This commit is contained in:
parent
19a91e2b16
commit
3ea51142fb
1 changed files with 11 additions and 6 deletions
|
|
@ -137,12 +137,17 @@ C++ namespaces
|
|||
|
||||
Mozilla project C++ declarations should be in the ``mozilla``
|
||||
namespace. Modules should avoid adding nested namespaces under
|
||||
``mozilla``, unless they are meant to contain names which have a high
|
||||
probability of colliding with other names in the code base. For example,
|
||||
``Point``, ``Path``, etc. Such symbols can be put under
|
||||
module-specific namespaces, under ``mozilla``, with short
|
||||
all-lowercase names. Other global namespaces besides ``mozilla`` are
|
||||
not allowed.
|
||||
``mozilla``. A couple of exceptions to this rule are:
|
||||
|
||||
- Names which have a high probability of colliding with other names in the
|
||||
code base. For example, ``Point``, ``Path``, etc. Such symbols can be put
|
||||
under module-specific namespaces, under ``mozilla``, with short
|
||||
all-lowercase names.
|
||||
- Classes that implement WebIDL bindings tend to live in ``mozilla::dom``,
|
||||
though this is not strictly required and can be customized via
|
||||
``Bindings.conf``. See :ref:`Web IDL bindings` for more information.
|
||||
|
||||
Other global namespaces besides ``mozilla`` are not allowed.
|
||||
|
||||
No ``using`` directives are allowed in header files, except inside class
|
||||
definitions or functions. (We don't want to pollute the global scope of
|
||||
|
|
|
|||
Loading…
Reference in a new issue