Commit Graph
171 Commits
Author SHA1 Message Date
ldm0 2f58b49cd0 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-22 02:02:08 +08:00
ldm0 6d56777a90 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-22 02:02:08 +08:00
ldm0 86a50027dc fix(reporting): expose native Report snapshots with toJSON 2026-11-22 02:02:08 +08:00
ldm0 27938ac883 feat(fetch): preserve response credentials state 2026-11-22 02:02:08 +08:00
ldm0 a261cf38e5 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-22 02:02:07 +08:00
ldm0 189bcad709 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-22 02:02:07 +08:00
ldm0 911d9c42d7 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-22 02:02:06 +08:00
ldm0 af94e87c7d feat(webtransport): connect native Window and worker streams 2026-11-22 02:02:06 +08:00
ldm0 728fd659e0 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-22 02:02:05 +08:00
ldm0 737ec4581b 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-22 02:02:05 +08:00
ldm0 629401adcb fix(webidl): adapt native dictionary consumers after main rebase 2026-11-22 02:02:05 +08:00
ldm0 0fbd62a009 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-22 02:02:05 +08:00
ldm0 5d4d3dfe9e 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-22 02:02:05 +08:00
ldm0 4f3a2d223b 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-22 02:02:05 +08:00
ldm0 f963b251b2 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-22 02:02:05 +08:00
ldm0 1f18114ec9 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-22 02:02:05 +08:00
ldm0 00dbbf5689 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-22 02:02:04 +08:00
ldm0 ae3f107827 refactor(cache): use derived request argument conversion 2026-11-22 02:02:04 +08:00
ldm0 8302e42757 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-22 02:02:04 +08:00
ldm0 52f3241135 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-22 02:02:04 +08:00
ldm0 d84b89bd4f fix(navigation): expose readonly activation and transition state 2026-11-22 02:02:04 +08:00
ldm0 672fdb27d8 fix(navigator): preserve native plugin collection semantics 2026-11-22 02:02:04 +08:00
ldm0 db8db412a9 fix(navigator): expose UAData attributes with native snapshots 2026-11-22 02:02:04 +08:00
ldm0 1e1266821c fix(media): derive capability configuration snapshots 2026-11-22 02:02:03 +08:00
ldm0 c25f23e737 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-22 02:02:03 +08:00
ldm0 595ea3aa3b 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-22 02:02:03 +08:00
ldm0 389928f77d 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-22 02:02:02 +08:00
ldm0 b784cc7995 fix(encoding): expose branded text stream prototype attributes 2026-11-22 02:02:02 +08:00
ldm0 7b70f21bcd 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-22 02:02:02 +08:00
ldm0 1c94b5c559 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-22 02:02:02 +08:00
ldm0 87fe41596a fix(canvas): transfer OffscreenCanvas through structured cloning 2026-11-22 02:02:02 +08:00
ldm0 355b5b54fa feat(canvas): render native patterns and propagate origin-clean state 2026-11-22 02:02:02 +08:00
ldm0 ce6f8320f4 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-22 02:02:01 +08:00
ldm0 d52ad84972 fix(canvas): honor ImageData color spaces and pixel formats 2026-11-22 02:02:01 +08:00
ldm0 190f563889 fix(canvas): preserve native ImageData construction and clone graphs 2026-11-22 02:02:01 +08:00
ldm0 88d6d203c1 fix(canvas): preserve pixel rectangles and native receivers 2026-11-22 02:02:01 +08:00
ldm0 9430aa450b fix(canvas): preserve native shadow and text style state 2026-11-22 02:02:01 +08:00
ldm0 0f57bdefc5 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-22 02:02:01 +08:00
ldm0 4c63bf66ca 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-22 02:02:01 +08:00
ldm0 5ee2df21b5 feat(eme): bind native interfaces and unavailable key-system requests 2026-11-22 02:02:01 +08:00
ldm0 6b6a609f28 fix(media): apply track constraints through native task commits 2026-11-22 02:02:01 +08:00
ldm0 2ae9d1097a fix(webrtc): associate local RTP ICE and DTLS transports 2026-11-22 02:02:01 +08:00
ldm0 b97eb0d2c5 fix(webrtc): complete local data channel closing and connection shutdown 2026-11-22 02:02:01 +08:00
ldm0 d1049ffa2a fix(webrtc): validate data channel initialization and attributes 2026-11-22 02:02:01 +08:00
ldm0 f45fc6416a fix(webrtc): synchronize signaling descriptions and state events 2026-11-22 02:02:01 +08:00
ldm0 c722cd85d5 fix(webrtc): validate local SDP and preserve offer provenance 2026-11-22 02:02:01 +08:00
ldm0 9474243abc feat(webrtc): add native RTP sender operations 2026-11-22 02:02:01 +08:00
ldm0 5ac7165533 feat(webrtc): add native RTP transceiver frontend 2026-11-22 02:02:01 +08:00
ldm0 08413e3e94 feat(webrtc): generate native certificates and preserve clone handles 2026-11-22 02:02:01 +08:00
ldm0 9455d8a603 feat(eme): add native key status map members 2026-11-22 02:02:00 +08:00