Reworks how a Node's child list is modeled. This used to be a optional pointer
to the child list, along with a Node representing this node's linkedlist node
in the parent's child list.
The new model is the same 24 bytes, but it's fully embedded: nodes with children
don't require another 16 byte allocation.
Generally speaking, this is more linked-list-ish, so it does simplify the code.
`linkToNode` is removed BUT, the first child's `_prev` points to the last child,
which is a bit unusual but necessary so that `lastChild` remains O(1).
This is a follow up to the large SVG change that has landed (1). Most changes
are mechanical or superficial (proper license headers, removing "pub" where not
needed, ...). But there were also a few finalizer/arena tweaks to tighten
lifetimes.
(1) https://github.com/lightpanda-io/browser/pull/3012
closeTarget above implies that the state this assertion guards against IS valid
AND we just had a crash report confirming. That's enough for me to remove it.
Zig 0.17 removes @cImport in favor of translate-c steps in the build
system. Each library's link function now creates an addTranslateC step
exposed as a module import: curl and isocline translate their headers
straight from the dependency tree, while sqlite3 uses the artifact's
emitted include tree since the amalgamation lives in a sub-dependency.
Terminal.zig and prompt_assist.zig previously instantiated two
independent @cImport namespaces for isocline; they now share one
translated module, so its types are identical across both files.
This isn't exhaustive, but it covers _most_ cases where we call v8 (and the
most important ones, e.g. from ScriptManager and EventManager).
There's also a Page counter which, in the future, I'd like to expose in some way
such as via a custom cdp command or in a fetch --dump json to provide insight
on the "health" of the page/result.
1 - Split out test to have more granular units
2 - Try to make our test and implementation consistent with Chrome and Firefox
- Chrome and Firefox diverge here in a lot of ways (e.g. serialization),
and there isn't always a WPT tests to break the tie.
3 - Removed some defensive code around OOM. OOM isn't generally recoverable
4 - SVGTransform no longer pretends to be 3D. #D writes drop the z/w component
and stays SVG_TRANSFORM_MATRIX
Small improvement to WPT correctness with no regression (though, the WPT tests
here seem to be a little lacking from what I can tell, which probably helps
explain why Chrome and Firefox disagree on things).
Zig 0.16 changed clocks/timestamps. Our migration to Zig 0.16 took the path of
least resistance. For example, we kept 'monotonic' and 'real' even though Zig
0.16 renamed them to 'boot' and 'clock'
This commit tries to standardize all timestamp usage to: lp.datetime.timestamp
and lp.datetime.milliTimestamp using the new zig 0.16 names ('boot' and 'clock')