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')
Keep SVGTransform.matrix synchronized with its owning transform and reflected attribute, including read-only animVal and 3D matrix state. Reserve collection storage before attribute commits so allocation failures cannot detach live objects or leave snapshots inconsistent.
Applies the same dictionary lookup pattern we did in https://github.com/lightpanda-io/browser/pull/3034
to the new Graphics, Polyline and Polygon fields.
Caps total memory from snapshot and retired items by collecting them in a buffer
rather than the frame arena. This allows the memory to be re-used at each sync.
Remove the Frame dependency from DOMPointReadOnly and DOMPoint. These types are
also accessible from a Worker (which has no Frame). The frame is captured at
creation time which the callback can access.
Give accurate connectionId, connectionReused, initialPriority and securityState
values.
Always set `referrerPolicy` to `unsafe-url` as the most honest answer (we should
implement proper referrer policy!).
For workers, track the underlying frame_id so that it can be used for the
`documentURL` field.
HTMLSelectElement collected its options from its direct children only, so an
<option> inside an <optgroup> was invisible to options, length, value,
selectedIndex, selectedOptions and to form submission. A grouped select could
not be read, set or submitted, while querySelectorAll("option") still found
every option.
Per HTML §the-select-element a select's list of options is its option element
descendants: its option children plus the option children of its optgroup
children.
- add a select_options collection mode, and move selected_options onto the
same walk, matching an option whose parent is the select or an optgroup
child of the select
- add one OptionIterator in Select.zig, used by effectiveOption, setValue,
getSelectedIndex, setSelectedIndex, getLength and add
- effectiveOption skips options disabled through <optgroup disabled>
(concept-option-disabled); those options only become reachable now that
grouped options are part of the list
- select.add(option, index) inserts into the optgroup when the option at that
index lives in one, per §dom-select-add
Closes#3057
JS controller.enqueue stores chunks as .js_value via enqueueValue, so
collectBodyBytes must extract TypedArray/ArrayBuffer/string bytes with
local scope and arena.dupe before buffering. Add multi-chunk success and
open/locked reject fixtures in fetch.html.
BodyInit.extract returned an empty body for ReadableStream request
bodies, so fetch POST with duplex:half silently sent Content-Length: 0.
Drain closed streams synchronously via collectBodyBytes; reject open,
locked, or errored streams with TypeError instead of sending nothing.
Fixeslightpanda-io/browser#3052
Follows the observer, user_input, etc.. pattern and relocates various
`Frame.parse*` methods into Frame.parse.* functions.
Goal is just to keep Frame neat.
Expand mime type to be aware of more XML types. DOMParser and XHR now use the
existing Parser.parseXML (via a Frame helper), rather than the HTML parser. Both
these APIs predate the addition of parseXML.