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:
Botond Ballo 2024-05-17 23:23:44 +00:00
parent 19a91e2b16
commit 3ea51142fb

View file

@ -137,12 +137,17 @@ C++ namespaces
Mozilla project C++ declarations should be in the ``mozilla`` Mozilla project C++ declarations should be in the ``mozilla``
namespace. Modules should avoid adding nested namespaces under namespace. Modules should avoid adding nested namespaces under
``mozilla``, unless they are meant to contain names which have a high ``mozilla``. A couple of exceptions to this rule are:
probability of colliding with other names in the code base. For example,
``Point``, ``Path``, etc. Such symbols can be put under - Names which have a high probability of colliding with other names in the
module-specific namespaces, under ``mozilla``, with short code base. For example, ``Point``, ``Path``, etc. Such symbols can be put
all-lowercase names. Other global namespaces besides ``mozilla`` are under module-specific namespaces, under ``mozilla``, with short
not allowed. 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 No ``using`` directives are allowed in header files, except inside class
definitions or functions. (We don't want to pollute the global scope of definitions or functions. (We don't want to pollute the global scope of