Leave the housekeeping to the NSHashTable itself, which should purge
null-references automatically (not necessarily right away)
Also update tests accordingly: Use `allObjects.count` instead of simply
`count` on the NSHashTable, since `allObjects.count` returns non-null
references.
This should fix#36
Fixes#30
Foreign attributes were handled incorrectly because attribute names
were implemented as pure strings without namespace prefix. This change
keeps the attributes as strings and eliminates any handling in regards
to namespaces.
Spec note about attributes:
"If designed today they would just have a name and value."
https://dom.spec.whatwg.org/#attr
Instead of allocating new dictionaries for the scope elements, the scope
checks are just unrolled in-place. Now we have 6 almost identical methods
that differ only in the inline-check-method. Not optimal but minimal
memory and performance penalty.
This should reduce memory consumption and increase the performance
while parsing, see issue #10
Do not use the `allObjects` call on the reverse enumerators in the Parser
and the List of Active Formatting Elements to prevent allocating a new
array of the unenumerated objects.
This should reduce memory consumption while parsing, see issue #10
The call self.childNodes always allocates the collection even if a nil
value is acceptable, i.e. hasChildNodes should return true even if the
childNodes Set is nil but should not allocate it yet.
Hence self.childNodes should only be used when appending child nodes.
Do not allocate empty collections for child nodes or attributes when
initializing new HTML Nodes or Elements. These are initialized the first
time they are accessed.
Analogously, the mutable data string of CharacterData is also allocated
with the empty string on first access.
Both CSSCodePoints.h and HTMLTokenizerCharacters.h define the same
symbols.
They are never included by the same compilation unit, but when they are
compiled into the same module, they create a conflict.
Fix this conflict by using `textual header`.