gecko-dev/parser/htmlparser
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
..
tests Bug 863246 - Fix test failures r=Gijs 2017-07-19 17:30:01 +08:00
CNavDTD.cpp
CNavDTD.h
CParserContext.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
CParserContext.h
moz.build Bug 1395828 (part 4) - Remove nsIParserService/nsParserService. r=mrbkap. 2017-09-05 20:19:06 +10:00
nsElementTable.cpp Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen 2017-10-02 13:22:12 +03:00
nsElementTable.h Bug 1400777 (part 5) - Clean up nsElementTable.{cpp,h}. r=mrbkap. 2017-09-20 08:32:51 +10:00
nsExpatDriver.cpp Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm. 2017-08-09 10:41:14 +10:00
nsExpatDriver.h
nsHTMLTagList.h Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen 2017-10-02 13:22:12 +03:00
nsHTMLTags.cpp Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj. 2017-10-22 08:50:25 +11:00
nsHTMLTags.h Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj. 2017-10-22 08:50:25 +11:00
nsHTMLTokenizer.cpp Bug 1325494 (part 5) - Slim down nsParserConstants.h. r=hsivonen. 2016-12-23 13:51:04 +11:00
nsHTMLTokenizer.h
nsIContentSink.h Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
nsIDTD.h
nsIExpatSink.idl
nsIExtendedExpatSink.idl
nsIFragmentContentSink.h
nsIHTMLContentSink.h
nsIParser.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsITokenizer.h
nsParser.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsParser.h Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
nsParserBase.h
nsParserCIID.h Bug 1402769 - Remove unused stuff in and around nsParserModule.cpp. r=mrbkap. 2017-09-05 20:43:30 +10:00
nsParserConstants.h Bug 1325494 (part 5) - Slim down nsParserConstants.h. r=hsivonen. 2016-12-23 13:51:04 +11:00
nsParserModule.cpp Bug 1402769 - Remove unused stuff in and around nsParserModule.cpp. r=mrbkap. 2017-09-05 20:43:30 +10:00
nsParserMsgUtils.cpp Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm. 2017-08-17 15:29:03 +10:00
nsParserMsgUtils.h
nsScanner.cpp Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
nsScanner.h Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
nsScannerString.cpp Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj. 2017-06-20 19:19:52 +10:00
nsScannerString.h Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj. 2017-06-20 19:19:52 +10:00