This should be much more robust against weirdly-formatted links that are
still valid URLs, additionally, future URL checkers can immediately
take advantage of the already-existing URL object.
Note that not all markdown links are valid URLs or paths, and that that
is intentional (e.g. only fragments, relative links etc.). We don't just
fail when something is not a URL.
CRC32 table is generated at compile-time and put into a static
variable in the header file. This can be moved to be a function
instead of a class, be moved to the `.cpp` file` and generated as an
array instead of a class which only implements `operator[]`.
Of course, Buffer is going to be removed very soon, but much of the
WavLoader behavior still depends on it. Therefore, this intermediary
API will allow adopting the Loader infrastructure without digging too
deep into the WavLoader legacy code. That's for later :^)
The Buffer files had contained both the ResampleHelper and the
sample format utilities. Because the Buffer class (and its file) is
going to be deleted soon, this commit separates those two things into
their own files.
The data is taken straight from the ISO/IEC 11172-3 standard. For
decoding efficiency the tables are transformed into trees at compile
time using a constexpr approach. That way no runtime initialization is
necessary and decoding can be faster than searching through tables.
The primary benefit of this is that it's unsigned, as you can't have a
negative amount of children. Plus, all the users of child_count expect
it to be size_t.
We now validate that the provided tag names are valid XML tag names,
and otherwise throw an "invalid character" DOM exception.
2% progression on ACID3. :^)
Since we now honor the CSS font-size values when deciding line box
metrics, we sometimes find ourselves needing to paint text with a bitmap
font into a box that isn't large enough for the glyphs.
As it turns out, it looks a bit better if we just grow the paint rect to
fit the glyphs (instead of painting chopped-off glyphs.) So let's just
do that for now.
If vertical-align is a length value, we lift each line box fragment that
far from the baseline of the line box.
This is rather messy, and we'll have to improve factoring as we add
support for more alignment types.
The purpose of "entering" a box is to collect box model metrics that
apply to content fragments within the box. However, inline-blocks are
special, in that their inner content does not directly participate in
the inline formatting context outside it.
We were neglecting to pop nodes from the box model stack. The metrics
were already being zeroed out when used, but let's not grow the stack
needlessly.