With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.
This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.
I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
And remove assorted spec FIXMEs along the way. Also align
populate_session_history_entry_document to the spec, with a bonus spec
bug to be filed.
This involves creating a new NonFetchSchemeNavigationParams spec, and
having the associated AOs take a Variant rather than Optional to
accomodate the fact that this extra struct could be returned by the
algorithm. We don't actually *do* anything with these params, but the
scaffolding is there now, with less TODOs.
If a navigable has been destroyed during a navigation process, we
should early return from it. The introduced checks are not in
the spec because, as explained in
https://github.com/whatwg/html/issues/9690 the spec is not written
with such a level of detail.
This is used by both Navigable and Navigation, so let's put it in
Navigable. Also add a missing AK/String include to make clangd happier
with the Navigable file.
This is only needed because currently spec doesn't explicitly define
that navigable should have a pointer to associated container and when
this pointer should be set.
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#attempt-to-populate-the-history-entry's-document
This is going to be a replacement for `FrameLoader::load()` after
switching to navigables.
Brief description of `populate_session_history_entry_document`:
- If navigation params have url with fetch scheme then DOM document
will be populated by fetching url and parsing response. This
is going to be a replacement for `FrameLoader::load(AK::URL&)`.
- If url in navigation params is abort:srcdoc then DOM document
will be populated by parsing HTML text passed in document resource.
This is going to be a replacement for `FrameLoader::load_html()`
This will be used to look up a document's node navigable. It might be
nice to have a direct pointer from Document to its Navigable, but at
the moment I don't understand the algorithms well enough to maintain
that linkage.
This is the first step towards implementing the new "navigable" concept
from the HTML spec.
Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>