Commit Graph
174 Commits
Author SHA1 Message Date
ldm0 8e3b445a1c fix(performance): report previous document unload timing
Observe each retiring Document's own unload event and transfer that record
only when its replacement commits. Expose modern and legacy timestamps
through the same native origin and redirect checks, including inherited
opaque origins. Keep pagehide and descendant unload handlers outside the
recorded interval.

Retain the accepted navigation clock for local child Documents so their
previous unload remains on the new timeline. Cover iframe and popup
replacement, cross-origin redirects, sandbox isolation and local srcdoc.
2026-11-20 22:48:01 +08:00
ldm0 b30e220fc5 fix(performance): retain native navigation timing 2026-11-20 22:48:01 +08:00
ldm0 059af0ea24 fix(timers): track idle periods and recompute deadlines
Share one deadline ceiling across callbacks in an idle period. Requests
registered after the period starts, including from microtasks and other
Windows, wait for the next opportunity; positive timeouts can expire first.

Recompute IdleDeadline.timeRemaining() from active HTML timers and pending
rendering work on every call. Retain the actual frame wake deadline through
rendering dispatch and use the deadline object's realm when borrowing the
method across windows. Preserve the existing DOM clock precision.

Cover twelve public budget scenarios, six period and timeout-order
scenarios, and future/cancelled/running timer deadline queries.
2026-11-20 22:48:00 +08:00
ldm0 6790abddb9 fix(fetch): reset inherited navigation state for defined RequestInit members
Use converted dictionary member presence without rereading JS getters.
Preserve native navigation flags for empty initialization, and reset them,
navigate mode and referrer metadata before applying defined overrides.
Retain null BodyInit presence without treating it as a replacement body.

Cover all supported reset-triggering members, absent/undefined members,
null body and signal, single getter evaluation, cache-mode validation order
and source Request isolation through the native constructor binding.

Validation: cargo fmt --all; all-target/all-feature workspace clippy with
-D warnings; full nextest (25,044 passed, 19 skipped), 32 threads, no retries.
2026-11-20 22:47:59 +08:00
ldm0 c5305eb696 fix(reporting): expose native Report snapshots with toJSON 2026-11-20 22:47:59 +08:00
ldm0 4efbd70555 feat(fetch): preserve response credentials state 2026-11-20 22:47:59 +08:00
ldm0 ad4519c881 fix(runtime): finish native context adaptation after main rebase
Use the native Worker Context binding for Trusted Types after removal of the private carrier. Follow the renamed Window bootstrap and initialize runtime-only Document environments explicitly.

Adapt the transaction GC regression to the store-name lifecycle argument and remove the obsolete whole-matrix timeout helper after main split cursor probes into bounded sections. Format the merged native context exports.
2026-11-20 22:47:59 +08:00
ldm0 4a16a92848 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-20 22:47:58 +08:00
ldm0 7d5cb8b469 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-20 22:47:57 +08:00
ldm0 a943e7a0a9 feat(webtransport): connect native Window and worker streams 2026-11-20 22:47:57 +08:00
ldm0 1d690b06b9 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-20 22:47:56 +08:00
ldm0 c47de1fecc 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-20 22:47:56 +08:00
ldm0 238d046a44 fix(webidl): adapt native dictionary consumers after main rebase 2026-11-20 22:47:56 +08:00
ldm0 4132a4038d 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-20 22:47:56 +08:00
ldm0 9eef35e69f 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-20 22:47:56 +08:00
ldm0 fbe28455f4 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-20 22:47:56 +08:00
ldm0 2c1b6f34ee 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-20 22:47:56 +08:00
ldm0 5e07fda543 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-20 22:47:56 +08:00
ldm0 c57dc1a6f9 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-20 22:47:55 +08:00
ldm0 5f34319d4b refactor(cache): use derived request argument conversion 2026-11-20 22:47:55 +08:00
ldm0 1c17d30113 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-20 22:47:55 +08:00
ldm0 2799af7af3 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-20 22:47:55 +08:00
ldm0 305739b9c8 fix(navigation): expose readonly activation and transition state 2026-11-20 22:47:55 +08:00
ldm0 19a546ecb2 fix(navigator): preserve native plugin collection semantics 2026-11-20 22:47:55 +08:00
ldm0 d6ce3925f5 fix(navigator): expose UAData attributes with native snapshots 2026-11-20 22:47:55 +08:00
ldm0 e773f6f8d0 fix(media): derive capability configuration snapshots 2026-11-20 22:47:55 +08:00
ldm0 d14b3a5dc0 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-20 22:47:54 +08:00
ldm0 f267b43fec 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-20 22:47:54 +08:00
ldm0 652e1f4e85 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-20 22:47:53 +08:00
ldm0 90f0a9063e fix(encoding): expose branded text stream prototype attributes 2026-11-20 22:47:53 +08:00
ldm0 ed64edc8f4 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-20 22:47:53 +08:00
ldm0 f3963c7048 fix(encoding): preserve legacy decoder state across empty chunks 2026-11-20 22:47:53 +08:00
ldm0 a73f443917 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-20 22:47:53 +08:00
ldm0 4cafbcfe8b fix(canvas): transfer OffscreenCanvas through structured cloning 2026-11-20 22:47:52 +08:00
ldm0 25ccd19098 feat(canvas): render native patterns and propagate origin-clean state 2026-11-20 22:47:52 +08:00
ldm0 f0de77d02b 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-20 22:47:52 +08:00
ldm0 aed969b572 fix(canvas): honor ImageData color spaces and pixel formats 2026-11-20 22:47:52 +08:00
ldm0 2823bdc5d7 fix(canvas): preserve native ImageData construction and clone graphs 2026-11-20 22:47:52 +08:00
ldm0 fe7d4fa6eb fix(canvas): preserve pixel rectangles and native receivers 2026-11-20 22:47:52 +08:00
ldm0 322b3d3fb5 fix(canvas): preserve native shadow and text style state 2026-11-20 22:47:52 +08:00
ldm0 0cd77d5aac 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-20 22:47:51 +08:00
ldm0 cca9d32917 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-20 22:47:51 +08:00
ldm0 65fdaa3eab feat(eme): bind native interfaces and unavailable key-system requests 2026-11-20 22:47:51 +08:00
ldm0 d8d95e6c20 fix(media): apply track constraints through native task commits 2026-11-20 22:47:51 +08:00
ldm0 9d056c4d7d fix(webrtc): associate local RTP ICE and DTLS transports 2026-11-20 22:47:51 +08:00
ldm0 8993edc2db fix(webrtc): complete local data channel closing and connection shutdown 2026-11-20 22:47:51 +08:00
ldm0 79fb7854c1 fix(webrtc): validate data channel initialization and attributes 2026-11-20 22:47:51 +08:00
ldm0 e85c22dca3 fix(webrtc): synchronize signaling descriptions and state events 2026-11-20 22:47:51 +08:00
ldm0 82a80ad3ae fix(webrtc): validate local SDP and preserve offer provenance 2026-11-20 22:47:51 +08:00
ldm0 299db911f2 feat(webrtc): add native RTP sender operations 2026-11-20 22:47:51 +08:00