This avoids us having to define extra wrappers.
The exceptions to this are `mutable_path` and `my_realm` which are
defined in classes which don't inherit from `AbstractCanvasMixin` and
thus still require a wrapper.
Previously we would static cast to the `IncludingClass` and access the
underlying state through methods exposed there, now we have an abstract
base class for the mixins. This removes some boilerplate and template
shennanigans.
This introduces two new top-level `ValueParsingContext`s,
`OnScreenCanvasContextFontValue` and `CanvasContextGenericValue`, while
these are handled the same for now, there is a distinction is whether or
not they allow tree counting functions (which will come in a later
commit)
When setting to a non-string value (i.e. a `CanvasGradient` or
`CanvasPattern`) we would accidentally update the fill style instead of
the stroke style.
Remove 11 heavy includes from Document.h that were only needed for
pointer/reference types (already forward-declared in Forward.h), and
extract the nested ViewportClient interface to a standalone header.
This reduces Document.h's recompilation cascade from ~1228 files to
~717 files (42% reduction). Headers like BrowsingContext.h that were
previously transitively included see even larger improvements (from
~1228 down to ~73 dependents).
It is not guaranteed that inherited classes have the same address as the
base of the derived class. In that case a reinterpret cast leads to
undefined behavior. This occured on msvc ABI. See:
https://godbolt.org/z/jGeEW3c48
Co-authored-by: ayeteadoe <ayeteadoe@gmail.com>