Commit Graph
167 Commits
Author SHA1 Message Date
ldm0 d56c035a47 fix(runtime): adapt retained WPT surfaces to native main APIs
Use native Document ownership, mutation plans, event outcomes and resource APIs. Remove duplicate declarations and obsolete adapters while retaining the existing behavior coverage.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Checks cover the integrated workspace with 32-way concurrency and no automatic retries.
2026-11-21 20:03:39 +08:00
ldm0 8adb402b2e fix(webtransport): deliver stream termination to JavaScript
Notify idle Window and worker streams through weak endpoint identities, preserving realm-correct error identity. Connect the existing controller AbortSignal algorithms to native cancellation.

Deliver pending bytes before FIN and acknowledge BYOB EOF through the shared Streams source completion helper.
2026-11-21 20:03:38 +08:00
ldm0 f062745f12 feat(webtransport): connect native Window and worker streams 2026-11-21 20:03:38 +08:00
ldm0 55bd9bd959 fix(runtime): reconcile native bindings after main rebase
Keep a single native registration for RTC frames and resource timing helpers after rebasing on main. Restore Worker Fetch header validation and adapt XHR reset visibility and the new response fixture to main's state helpers.
2026-11-21 20:03:37 +08:00
ldm0 98f9e82dc5 fix(websocket): register stream aborts with the native signal owner
Replace author-visible abort listeners with the existing native AbortSignal algorithm route. Keep handshake-only callback roots on the connection and release them on open, failure, close or owner retirement.

Convert protocols and signal through the shared dictionary derive before URL validation, preserving original thrown values and rejecting forged or proxy signals without author traps. Cover actual echo I/O, cross-realm native cancellation and callback-root lifetime.
2026-11-21 20:03:37 +08:00
ldm0 6711d72a6b fix(webidl): adapt native dictionary consumers after main rebase 2026-11-21 20:03:37 +08:00
ldm0 92cc94d675 fix(webidl): preserve exception strings and CloseInfo conversion order
Preserve DOMException message/name and derived exception messages with the
existing UTF-16 argument converter and native V8 string slots. Return the
stored DOMException name without a lossy Rust text round trip.

Parse WebSocketError and WebSocketStream.close with a shared derived
CloseInfo dictionary. Propagate argument/getter/conversion failures before
semantic close validation or socket mutation. Keep reason as USVString and
match Chromium's observed truncating close-code clamp in the existing
protocol helper without changing the global WebIDL Clamp converter.

Retain native constructor allocation, brands, failure stack boundaries and
serialization formats. Cover Window/child and worker constructor conversions,
Stream method ordering, null members, proxies, exact thrown values and numeric
limits with fixed-Chromium differential fixtures and existing network tests.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(23222 passed, 17 existing skips, 32 threads, no automatic retries).
2026-11-21 20:03:37 +08:00
ldm0 5d3cd0de73 fix(webidl): classify DOMException through V8 native error hooks
Register V8's API-wrapper error classifier for Window and worker isolates,
using the existing native DOMException interface brand and inheritance.
Keep Error.isError itself unchanged, including ordinary Error and Proxy
classification and author getter avoidance.

Allocate native exception data/failures through cached interface instance
templates. Preserve sparse facade/host contexts with a cached API wrapper
allocator and their existing declaration/prototype policy. Keep the data
versus failure-stack boundary, native constructor path and wire format.

Cover script/subclass/native/cloned exceptions, genuine and forged receivers,
worker kinds, bare and retired cold contexts, and cross-realm behavior.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(23219 passed, 17 existing skips, 32 threads, no automatic retries).
2026-11-21 20:03:37 +08:00
ldm0 93c873a8d2 fix(errors): separate exception data from native failure stacks
Build script-created DOMException subclasses and deserialized exception data without attaching a new stack. Native failure factories keep V8 stack capture, including the WebTransport session-failure path that previously reused its clone builder.

Preserve inherited stack accessors, native clone fields, realm and reference identity, getter avoidance, and ordinary JS Error stacks. Reuse a fixed Chromium fixture in Window, child Window, classic Worker, and module Worker.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (23213 passed, 17 existing skips, 32 threads, no retries).
2026-11-21 20:03:37 +08:00
ldm0 edc1d767eb feat(urlpattern): add native Window and worker bindings
Use derived dictionaries and snapshots with native receiver brands. Reuse
URLPattern component parsing and bounded V8 regular expressions, including
scoped protocol inference and Unicode-set matching.

Keep native V8 constructor allocation. Cover cross-realm receivers, input
snapshots, isolated regex captures and native matching resource limits.

Validation: fmt and workspace clippy passed; nextest 23152 passed with 17
existing skips. Original stable URLPattern WPT: 2214 PASS in each of debug,
release and Chromium 152 across Window and dedicated Worker cases.
2026-11-21 20:03:36 +08:00
ldm0 760dce2107 revert(webidl): retain native V8 constructor allocation
Withdraw the deferred-prototype entry introduced by cf7650f744 and migrate
all 22 public constructor kinds back to their native FunctionTemplate.
Remove hidden NewTarget state and the vendored callback argument override.

Accept Chromium's prototype lookup timing and primitive prototype fallback
instead of paying for per-construction Proxies, hidden functions and state.
Keep native brands, dictionary conversion and the separate HTMLConstructor
path. Preserve the collection Reflect.set intrinsic in its own module.

Cover native function identity, subclassing, explicit and cross-realm
prototypes, exception order, and mutation during argument conversion.
2026-11-21 20:03:36 +08:00
ldm0 32957f2f09 fix(events): derive CustomEvent initialization and prototype detail
Expose detail through the native CustomEvent prototype declaration and
validate receivers with the shared interface brand. Keep arbitrary payload
values in the private event backing without projecting or copying them.

Convert inherited EventInit and raw CustomEventInit members through the
shared dictionary derive before initializing state. Preserve exceptions,
getter order, empty dictionary defaults and legacy initialization semantics.

Cover cross-realm descriptors, abrupt conversions, author and registered
native Proxies, windowless Documents and author-modified prototypes.
2026-11-21 20:03:36 +08:00
ldm0 ed621290e0 refactor(cache): use derived request argument conversion 2026-11-21 20:03:36 +08:00
ldm0 040f2eee22 fix(navigation): preserve activation source Document provenance
Carry source lifecycle through shared history seeds, native requests, and
private activation state. Project from using the committed Document origin
so initial, inherited, cross-origin, and opaque sources stay distinct.

Record child Document origins at commit and retain the traversal visibility
boundary. Cover 19 real HTTP scenarios and the current upstream initial
about:blank WPT on both HTTP and HTTPS.
2026-11-21 20:03:36 +08:00
ldm0 33ff11416f fix(navigation): retain activation across native history snapshots
Capture the associated private state when synchronizing child history, so
readonly attributes and author shadows cannot erase or replace activation.
Restore its entry by identity even after same-document history changes.

Cover normal, shadowed and frozen objects and recreate their structured
state after source-isolate teardown using real HTTP child Documents.
2026-11-21 20:03:36 +08:00
ldm0 0e5928ed66 fix(navigation): expose readonly activation and transition state 2026-11-21 20:03:36 +08:00
ldm0 ee6179d6be fix(navigator): preserve native plugin collection semantics 2026-11-21 20:03:36 +08:00
ldm0 287d34423d fix(navigator): expose UAData attributes with native snapshots 2026-11-21 20:03:36 +08:00
ldm0 1022b4fcf9 fix(media): derive capability configuration snapshots 2026-11-21 20:03:35 +08:00
ldm0 928050ff6c refactor(webrtc): derive session description snapshots
Use one typed RTCSessionDescriptionInit schema for constructor conversion, native factories, private backing and fresh JSON results. Reuse the RTCSdpType enum and retain UTF-16 SDP, lexical input conversion and the existing type/sdp output order.

Resolve registered native Proxy receivers through shared identity before reading the private snapshot. Keep returned dictionaries independent and emit fixed local-description payloads through the data_properties declaration.
2026-11-21 20:03:35 +08:00
ldm0 86baa01e61 fix(runtime): integrate typed API state and Window ownership with main
Reconcile API dictionary snapshots and data properties with main, and migrate frontend listener state to the shared native EventTarget machinery. Preserve native proxy dispatch identity and validate callbacks in their captured execution context.

Use the shared cross-origin Window and Location infrastructure while retaining callee-realm errors, entry and incumbent navigation settings, lazy child contexts and document-order named access. Update regression fixtures for native task ownership and published geometry; retain all matrix assertions and compare video frame pixels directly without stringifying them.
2026-11-21 20:03:35 +08:00
ldm0 44f1e64b0d fix(performance): expose native resource timing response metadata
Add the remaining response metadata and router getters with native JSON snapshots. Preserve request, interim and final header observations through Window and Worker fetch lifecycles, and filter iframe encoding metadata before discarding redirect provenance.

Validation: cargo fmt --all; strict workspace/all-target/all-feature Clippy; 22470 nextest PASS with 16 existing skips; 2114 retained original WPT PASS; 24/24 interim-response tests and 28/28 native metadata contract checks. Original WPT gained 106 PASS without losing existing PASS.
2026-11-21 20:03:34 +08:00
ldm0 fedeac65a4 fix(encoding): expose branded text stream prototype attributes 2026-11-21 20:03:34 +08:00
ldm0 c3fa9a0d39 fix(encoding): preserve decoder and BOM state after stream errors
Preserve codec state across streaming errors, serialize BOM state only for successful output, and reset both at non-stream boundaries. Cover ISO-2022-JP recovery and Unicode BOM handling in native, Window, and Worker tests.
2026-11-21 20:03:34 +08:00
ldm0 e7a79b321f fix(encoding): preserve legacy decoder state across empty chunks 2026-11-21 20:03:34 +08:00
ldm0 5982cc6208 fix(webvtt): bind cue and region attributes to native state
Add VTTRegion and the missing VTTCue alignment and region accessors with
native WebIDL receiver checks. Preserve UTF-16 and unbounded end times.

Build parsed cues from native prototypes and private slots, and create
HTML fragments in the cue realm's associated Document. Correct the two
obsolete native assertions that rejected positive Infinity end times.
2026-11-21 20:03:34 +08:00
ldm0 f282d42541 fix(canvas): transfer OffscreenCanvas through structured cloning 2026-11-21 20:03:33 +08:00
ldm0 69b1fd7212 feat(canvas): render native patterns and propagate origin-clean state 2026-11-21 20:03:33 +08:00
ldm0 2319a69dda feat(canvas): preserve native HDR pixel storage
Retain float16/unorm8, sRGB/Display-P3 and alpha representation through
Canvas, OffscreenCanvas, ImageData and ImageBitmap operations. Composite
in premultiplied coordinates, convert at native format boundaries and
preserve untouched pixel bytes across partial writes and bitmap copies.

Keep parsed drawing colors independent from CSS serialization and use
the shared native receiver bindings for color attributes. Correct the
old trailing-zero serialization expectation against Chromium output.

Validation: fmt, full workspace clippy and nextest (22234 passed,
16 skipped; 32 jobs/threads, zero retries). Original WPT: 914/1116 (+12), all 902 prior passes retained. Sources,
harnesses and assertions are unchanged; browser evidence is retained.
2026-11-21 20:03:33 +08:00
ldm0 c8fd8faaaa fix(canvas): honor ImageData color spaces and pixel formats 2026-11-21 20:03:33 +08:00
ldm0 2447c44785 fix(canvas): preserve native ImageData construction and clone graphs 2026-11-21 20:03:33 +08:00
ldm0 dffa24384a fix(canvas): preserve pixel rectangles and native receivers 2026-11-21 20:03:33 +08:00
ldm0 b8a6dd9c37 fix(canvas): preserve native shadow and text style state 2026-11-21 20:03:33 +08:00
ldm0 ecdb578d20 feat(webrtc): bind native RTP script transform workers and streams
Queue transform creation and association on the owning Dedicated Worker, including module bootstrap and cross-realm Worker arguments. Reuse native WebIDL brands, clone/transfer validation, ordered event handlers and real Streams; preserve permanent endpoint ownership and locked-stream disassociation.

Expose the current draft Worker transformer and keyframe event interfaces. Keyframe requests reject when no encoder/depacketizer exists; actual media capture, encoded frames, RTP and SFrame packetization remain pending.

Validation: repository fmt, workspace all-target/all-feature clippy, and full nextest at 32 workers with zero retries; complete original RTP WPT files and prior runtime regressions retained.
2026-11-21 20:03:32 +08:00
ldm0 5f41d4e4d0 feat(webtransport): bind native sessions and datagram frontend
Use native WebIDL declarations, stable promises, real Streams and owned
networking tasks for constructor validation, datagram buffering, send groups
and session failure. Preserve receiver brands, native Proxy identity, callee
error realms and Window/worker ownership without fabricating a connection.

Normalize registered native WritableStream proxies and keep browser
networking algorithms within their selected task completion boundary.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
--test-threads 32 --retries 0.
2026-11-21 20:03:32 +08:00
ldm0 c7a94656b2 feat(eme): bind native interfaces and unavailable key-system requests 2026-11-21 20:03:32 +08:00
ldm0 7545e19ecc fix(media): apply track constraints through native task commits 2026-11-21 20:03:32 +08:00
ldm0 a6b6dfc39f fix(webrtc): associate local RTP ICE and DTLS transports 2026-11-21 20:03:32 +08:00
ldm0 c9767c7f66 fix(webrtc): complete local data channel closing and connection shutdown 2026-11-21 20:03:32 +08:00
ldm0 cb174c8024 fix(webrtc): validate data channel initialization and attributes 2026-11-21 20:03:32 +08:00
ldm0 9393cddc82 fix(webrtc): synchronize signaling descriptions and state events 2026-11-21 20:03:32 +08:00
ldm0 7496126ab8 fix(webrtc): validate local SDP and preserve offer provenance 2026-11-21 20:03:32 +08:00
ldm0 9f00a211b1 feat(webrtc): add native RTP sender operations 2026-11-21 20:03:32 +08:00
ldm0 f78ff49db6 feat(webrtc): add native RTP transceiver frontend 2026-11-21 20:03:32 +08:00
ldm0 9bbaf3dbe6 feat(webrtc): generate native certificates and preserve clone handles 2026-11-21 20:03:32 +08:00
ldm0 fa6cc139ea feat(eme): add native key status map members 2026-11-21 20:03:32 +08:00
ldm0 7060b5cecc feat(css): expose native animation metadata and event associations 2026-11-21 20:03:32 +08:00
ldm0 1ddfaefb72 fix(canvas): save and restore native 2D drawing state 2026-11-21 20:03:32 +08:00
ldm0 f848735cff fix(build): reconcile native SVG bindings after main rebase
Remove duplicated SVG declarations and stale shims introduced while replaying
the topic history onto the native SVG interfaces commit in main. Preserve
the later derive, UTF-16 and SMIL implementations and all active tests.

Enable main's lone-surrogate SVG animated-string regression now that the
native attribute storage supports UTF-16.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(21730 passed, 16 skipped; 32 threads; no automatic retries).
2026-11-21 20:03:31 +08:00
ldm0 c3fe259b96 fix(canvas): support native bitmaprenderer transfers
Expose ImageBitmapRenderingContext through HTML and Offscreen canvas modes.
Transfer the native pixel backing, detach the source, preserve natural
output dimensions, and share canvas readback and PNG/Blob exports.

Use generated WebIDL receiver and argument checks, including registered
native Proxies. Protect context caches with private slots and apply alpha
settings through the shared dictionary derive.

Validate actual bitmap tasks, cross-realm pixel and export behavior, and
worker surface contracts. Full fmt, workspace clippy and nextest pass.
2026-11-21 20:03:31 +08:00