Name Description Size
jArray.h 3848
java If this is your first time building the HTML5 parser, you need to execute the 4
javasrc The .java files in this directory were placed here by the Java-to-C++ 10
moz.build 2808
nsAHtml5TreeBuilderState.h Interface for exposing the internal state of the HTML5 tree builder. For more documentation, please see https://hg.mozilla.org/projects/htmlparser/file/tip/src/nu/validator/htmlparser/impl/StateSnapshot.java 1319
nsAHtml5TreeOpSink.h The purpose of this interface is to connect a tree op executor (main-thread case), a tree op stage (non-speculative off-the-main-thread case) or a speculation (speculative case). 733
nsHtml5ArrayCopy.h 2567
nsHtml5AtomTable.cpp 948
nsHtml5AtomTable.h nsHtml5AtomTable provides non-locking lookup and creation of atoms for nsHtml5Parser or nsHtml5StreamParser. The hashtable holds dynamically allocated atoms that are private to an instance of nsHtml5Parser or nsHtml5StreamParser. (Static atoms are used on interned nsHtml5ElementNames and interned nsHtml5AttributeNames. Also, when the doctype name is 'html', that identifier needs to be represented as a static atom.) Each instance of nsHtml5Parser has a single instance of nsHtml5AtomTable, and each instance of nsHtml5StreamParser has a single instance of nsHtml5AtomTable. Dynamic atoms obtained from an nsHtml5AtomTable are valid for == comparison with each other or with atoms declared in nsHtml5Atoms within the nsHtml5Tokenizer and the nsHtml5TreeBuilder instances owned by the same nsHtml5Parser/nsHtml5StreamParser instance that owns the nsHtml5AtomTable instance. Dynamic atoms (atoms whose IsStatic() returns false) obtained from nsHtml5AtomTable must be re-obtained from another atom table when there's a need to migrate atoms from an nsHtml5Parser to its nsHtml5StreamParser (re-obtain from the other nsHtml5AtomTable), from an nsHtml5Parser to its owner nsHtml5Parser (re-obtain from the other nsHtml5AtomTable) or from the parser to the DOM (re-obtain from the application-wide atom table). To re-obtain an atom from another atom table, obtain a string from the atom using ToString(nsAString&) and look up an atom in the other table using that string. An instance of nsHtml5AtomTable that belongs to an nsHtml5Parser is only accessed from the main thread. An instance of nsHtml5AtomTable that belongs to an nsHtml5StreamParser is accessed both from the main thread and from the thread that executes the runnables of the nsHtml5StreamParser instance. However, the threads never access the nsHtml5AtomTable instance concurrently in the nsHtml5StreamParser case. Methods on the atoms obtained from nsHtml5AtomTable may be called on any thread, although they only need to be called on the main thread or on the thread working for the nsHtml5StreamParser when nsHtml5AtomTable belongs to an nsHtml5StreamParser. Dynamic atoms obtained from nsHtml5AtomTable are deleted when the nsHtml5AtomTable itself is destructed, which happens when the owner nsHtml5Parser or nsHtml5StreamParser is destructed. 3674
nsHtml5AttributeEntry.h 2153
nsHtml5AttributeName.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit AttributeName.java instead and regenerate. 141722
nsHtml5AttributeName.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit AttributeName.java instead and regenerate. 28796
nsHtml5AutoPauseUpdate.h 850
nsHtml5ByteReadable.h A weak reference wrapper around a byte array. 657
nsHtml5ContentCreatorFunction.h 546
nsHtml5DependentUTF16Buffer.cpp 1060
nsHtml5DependentUTF16Buffer.h Wraps a string without taking ownership of the buffer. aToWrap MUST NOT go away or be shortened while nsHtml5DependentUTF16Buffer is in use. 1120
nsHtml5DocumentBuilder.cpp 3258
nsHtml5DocumentBuilder.h Marks this parser as broken and tells the stream parser (if any) to terminate. @return aReason for convenience 4039
nsHtml5DocumentMode.h 382
nsHtml5ElementName.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit ElementName.java instead and regenerate. 71882
nsHtml5ElementName.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit ElementName.java instead and regenerate. 14367
nsHtml5Highlighter.cpp 25229
nsHtml5Highlighter.h A state machine for generating HTML for display in View Source based on the transitions the tokenizer makes on the source being viewed. 10154
nsHtml5HtmlAttributes.cpp 6854
nsHtml5HtmlAttributes.h 3263
nsHtml5Macros.h nsHtml5Macros_h 1299
nsHtml5MetaScanner.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit MetaScanner.java instead and regenerate. 23992
nsHtml5MetaScanner.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit MetaScanner.java instead and regenerate. 4512
nsHtml5MetaScannerCppSupplement.h 1295
nsHtml5MetaScannerHSupplement.h 389
nsHtml5Module.cpp 3516
nsHtml5Module.h 680
nsHtml5NamedCharacters.cpp To avoid having lots of pointers in the |charData| array, below, which would cause us to have to do lots of relocations at library load time, store all the string data for the names in one big array. Then use tricks with enums to help us build an array that contains the positions of each within the big arrays. 4010
nsHtml5NamedCharacters.h 1747
nsHtml5NamedCharactersAccel.cpp 20322
nsHtml5NamedCharactersAccel.h 523
nsHtml5NamedCharactersInclude.h Data generated from the table of named character references found at http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html#named-character-references Files that #include this file must #define NAMED_CHARACTER_REFERENCE as a macro of four parameters: 1. a unique integer N identifying the Nth [0,1,..] macro expansion in this file, 2. a comma-separated sequence of characters comprising the character name, without the first two letters or 0 if the sequence would be empty. See Tokenizer.java. 3. the length of this sequence of characters, 4. placeholder flag (0 if argument #is not a placeholder and 1 if it is), 5. a comma-separated sequence of char16_t literals corresponding to the code-point(s) of the named character. The macro expansion doesn't have to refer to all or any of these parameters, but common sense dictates that it should involve at least one of them. 260123
nsHtml5OplessBuilder.cpp 1022
nsHtml5OplessBuilder.h This class implements a minimal subclass of nsHtml5DocumentBuilder that works when tree operation queues that are part of the off-the-main-thread parsing machinery are not used and, therefore, nsHtml5TreeOpExecutor is not used. This class is mostly responsible for wrapping tree building in an update batch and resetting various fields in nsContentSink upon finishing. 1075
nsHtml5OwningUTF16Buffer.cpp stabilize 2352
nsHtml5OwningUTF16Buffer.h Passes a buffer and its length to the superclass constructor. 1500
nsHtml5Parser.cpp 24799
nsHtml5Parser.h Start nsIParser 9959
nsHtml5PlainTextUtils.cpp 1366
nsHtml5PlainTextUtils.h 491
nsHtml5Portability.cpp 3326
nsHtml5Portability.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit Portability.java instead and regenerate. 3243
nsHtml5SVGLoadDispatcher.cpp 1337
nsHtml5SVGLoadDispatcher.h 616
nsHtml5Speculation.cpp 971
nsHtml5Speculation.h Flush the operations from the tree operations from the argument queue unconditionally. 1695
nsHtml5SpeculativeLoad.cpp 5276
nsHtml5SpeculativeLoad.h 15422
nsHtml5StackNode.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit StackNode.java instead and regenerate. 7542
nsHtml5StackNode.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit StackNode.java instead and regenerate. 3759
nsHtml5StateSnapshot.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit StateSnapshot.java instead and regenerate. 4327
nsHtml5StateSnapshot.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit StateSnapshot.java instead and regenerate. 3441
nsHtml5StreamListener.cpp 1992
nsHtml5StreamListener.h The purpose of this class is to reconcile the problem that nsHtml5StreamParser is a cycle collection participant, which means that it can only be refcounted on the main thread, but nsIThreadRetargetableStreamListener can be refcounted from another thread, so nsHtml5StreamParser being an nsIThreadRetargetableStreamListener was a memory corruption problem. mDelegate is an nsHtml5StreamParserPtr, which releases the object that it points to from a runnable on the main thread. DropDelegate() is only called on the main thread. This call will finish before the main-thread derefs the nsHtml5StreamListener itself, so there is no risk of another thread making the refcount of nsHtml5StreamListener go to zero and running the destructor concurrently. Other than that, the thread-safe nsISupports implementation takes care of the destructor not running concurrently from different threads, so there is no need to have a mutex around nsHtml5StreamParserPtr to prevent it from double-releasing nsHtml5StreamParser. 2041
nsHtml5StreamParser.cpp Note that nsHtml5StreamParser implements cycle collecting AddRef and Release. Therefore, nsHtml5StreamParser must never be refcounted from the parser thread! To work around this limitation, runnables posted by the main thread to the parser thread hold their reference to the stream parser in an nsHtml5StreamParserPtr. Upon creation, nsHtml5StreamParserPtr addrefs the object it holds just like a regular nsRefPtr. This is OK, since the creation of the runnable and the nsHtml5StreamParserPtr happens on the main thread. When the runnable is done on the parser thread, the destructor of nsHtml5StreamParserPtr runs there. It doesn't call Release on the held object directly. Instead, it posts another runnable back to the main thread where that runnable calls Release on the wrapped object. When posting runnables in the other direction, the runnables have to be created on the main thread when nsHtml5StreamParser is instantiated and held for the lifetime of the nsHtml5StreamParser. This works, because the same runnabled can be dispatched multiple times and currently runnables posted from the parser thread to main thread don't need to wrap any runnable-specific data. (In the other direction, the runnables most notably wrap the byte data of the stream.) 74507
nsHtml5StreamParser.h Parse a document normally as HTML. 17203
nsHtml5StreamParserPtr.h Like nsRefPtr except release is proxied to the main thread. Mostly copied from nsRefPtr. 7349
nsHtml5String.cpp 5825
nsHtml5String.h A pass-by-value type that can represent * nullptr * empty string * Non-empty string as exactly-sized (capacity is length) `nsStringBuffer*` * Non-empty string as an nsAtom* Holding or passing this type is as unsafe as holding or passing `nsStringBuffer*`/`nsAtom*`. 3431
nsHtml5StringParser.cpp 3931
nsHtml5StringParser.h Constructor for use ONLY by nsContentUtils. Others, please call the nsContentUtils statics that wrap this. 2502
nsHtml5Tokenizer.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit Tokenizer.java instead and regenerate. 154108
nsHtml5Tokenizer.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit Tokenizer.java instead and regenerate. 13017
nsHtml5TokenizerCppSupplement.h 12940
nsHtml5TokenizerHSupplement.h Makes sure the buffers are large enough to be able to tokenize aLength UTF-16 code units before having to make the buffers larger. @param aLength the number of UTF-16 code units to be tokenized before the next call to this method. @return true if successful; false if out of memory 2951
nsHtml5TokenizerLoopPolicies.h This policy does not report tokenizer transitions anywhere. To be used when _not_ viewing source. 1309
nsHtml5TreeBuilder.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit TreeBuilder.java instead and regenerate. 156927
nsHtml5TreeBuilder.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit TreeBuilder.java instead and regenerate. 20393
nsHtml5TreeBuilderCppSupplement.h 62869
nsHtml5TreeBuilderHSupplement.h Tree builder uses this to report quirkiness of the document 6634
nsHtml5TreeOpExecutor.cpp 38107
nsHtml5TreeOpExecutor.h Whether EOF needs to be suppressed 7701
nsHtml5TreeOpStage.cpp 1589
nsHtml5TreeOpStage.h Flush the operations from the tree operations from the argument queue unconditionally. 1540
nsHtml5TreeOperation.cpp Helper class that opens a notification batch if the current doc is different from the executor doc. 41818
nsHtml5TreeOperation.h 19510
nsHtml5UTF16Buffer.cpp THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit UTF16Buffer.java instead and regenerate. 2698
nsHtml5UTF16Buffer.h THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. Please edit UTF16Buffer.java instead and regenerate. 2371
nsHtml5UTF16BufferCppSupplement.h 818
nsHtml5UTF16BufferHSupplement.h For working around the privacy of |buffer| in the generated code. 509
nsHtml5ViewSourceUtils.cpp 2521
nsHtml5ViewSourceUtils.h 556
nsIContentHandle.h 237
nsIParserUtils.idl Non-Web HTML parser functionality to Firefox extensions and XULRunner apps. Don't use this from within Gecko--use nsContentUtils, nsTreeSanitizer, etc. directly instead. 5418
nsParserUtils.cpp 4165
nsParserUtils.h 556