Commit Graph
1427 Commits
Author SHA1 Message Date
ldm0 ef58539ace fix(dom): clear root handlers without invoking author setters 2026-10-02 04:04:55 +08:00
ldm0 0a87c564fc fix(webidl): validate observer Element arguments with native brands
Use native Web API identity for ResizeObserver and IntersectionObserver targets and roots, accepting genuine cross-realm objects and registered native proxies while rejecting forged, inherited and author-Proxy values. Validate root membership during dictionary conversion, before later getters, and resolve native targets without reading public nodeType properties.

A 204-case regression matrix covers both observer interfaces and realms, native proxy acceptance, invalid targets, poisoned properties, option conversion order and original exception identity.

Expose the backing-object lookup from the existing native brand layer rather than unwrapping author Proxies in DOM callbacks. Extend its existing identity tests for cross-realm objects, forged objects, registered native Proxies, outer author Proxies and revocation.
2026-10-02 01:10:35 +08:00
ldm0 f776d539bb test(fetch): preserve explicitly empty author header values
Verify that explicitly empty request headers remain present while omitted Content-Type stays absent. Cover native HTTP transports and renderer Fetch/XHR requests, including bodyless, empty and non-empty uploads. No production transport behavior is changed.
2026-10-02 00:44:35 +08:00
ldm0 ff5361ae31 feat(webaudio): expose native audio event payloads
Expose AudioProcessingEvent and OfflineAudioCompletionEvent as native Event subclasses with readonly branded payloads and WebIDL dictionary conversion. OfflineAudioContext emits a trusted completion event in its own realm, including when public constructors are replaced.

The regression matrix covers the main Window and same-origin child Window, subclassing, UTF-16 event types, malformed buffers, conversion order, callee-realm TypeErrors, dispatch identity and completion flags. This branch uses the AudioBuffer and OfflineAudioContext already on main.
2026-10-02 00:43:14 +08:00
ldm0 c3b5a3e765 fix(fetch): resolve Request URLs against the live document base 2026-10-01 23:00:59 +08:00
ldm0 6aeffcf522 test(css): cover completed parser style contents and CSP checks 2026-10-01 22:49:41 +08:00
ldm0 86f5f3d6ff test(cdp): bind failed navigation lifecycle to its document commit 2026-10-01 22:48:27 +08:00
ldm0 e52e9fd5e6 fix(dom): return only SVG documents from getSVGDocument 2026-10-01 22:48:00 +08:00
ldm0 20254be685 fix(dom): expose getSVGDocument on frame owner interfaces 2026-10-01 22:48:00 +08:00
ldm0 a7b8f43d77 fix(events): initialize native lifecycle trust and transition flags 2026-10-01 22:47:05 +08:00
ldm0 f8edead3f6 fix(workers): prevent recursive local error reporting 2026-10-01 22:46:20 +08:00
ldm0 b6f43fa61c fix(indexeddb): preserve ImageData when cloning stored values 2026-10-01 22:39:46 +08:00
ldm0 4c264b2d92 fix(indexeddb): preserve factory conversion and request ownership
IDBFactory.cmp preserves exceptions from key getters and reports invalid keys as DataError instead of rewriting both cases to TypeError. The generated receiver check continues to run before key conversion.

Schedule open/delete operations in the factory receiver’s realm after completing argument conversions in the callee realm. Borrowing an iframe method previously created a correctly branded request but scheduled its upgrade in the wrong context, leaving it pending.

Expand the factory regression fixture to exercise key conversion and request completion after removing the genuine factory prototype, using main Window, child Window and worker factories. Correct the ported cmp(undefined, key) expectation to DataError.
2026-10-01 18:24:57 +08:00
ldm0 3b35e5fa0f fix(fetch): separate manual hop lookup from transport redirect limits
Keep redirect URL lookup available when the renderer follows HTTP hops itself. A transport request with follow_redirects=false must not reapply the automatic transport redirect limit to the renderer’s already-recorded URL chain; automatically followed requests retain their existing limit. CORS checks still run for every browser-managed hop.

The regression verifies manual lookup at the transport limit, rejection for automatic following at the same limit, and rejection when the manual hop lacks CORS permission.
2026-10-01 16:57:00 +08:00
ldm0 e6e9a3309c feat(webidl): add lossless DOMString conversion
Add an explicit UTF-16 DOMString converter for bindings that must preserve lone surrogates. Reuse the existing UTF-16 extraction helper and keep this change additive, without rerouting the existing DOMString converter.

Regressions cover code-unit preservation, scalar conversion, null-to-empty options, single string-hint coercion, exception identity and callee-realm TypeErrors. Existing DOMString and USVString behavior is also checked.
2026-10-01 16:54:03 +08:00
ldm0 e03f6a71c5 feat(webidl): support restricted float conversion
Add the WebIDL restricted float converter and f32 inference in generated argument and dictionary bindings. Round finite numbers to binary32, reject values that become nonfinite, and preserve exceptions from numeric conversion.

Regression coverage compares rounding with V8 Math.fround, including signed zero, subnormals and overflow, and checks implicit/explicit derived argument conversion, single coercion, exception identity and the callee TypeError realm. Extracted from the AudioBuffer commit without an audio runtime dependency.
2026-10-01 16:53:47 +08:00
ldm0 5c19ed1006 refactor(dom): resolve attribute references in the renderer handler 2026-10-01 16:51:46 +08:00
ldm0 eb2d679e44 refactor(automation): name semantic commands and renderer CDP calls 2026-10-01 16:51:46 +08:00
ldm0 f2cd0fd488 refactor(cdp): pass preload commands directly between phases 2026-10-01 16:51:46 +08:00
ldm0 28e40e5287 refactor(renderer): publish nested prefixes with their retention fences 2026-10-01 16:51:46 +08:00
ldm0 64033a0be9 refactor(renderer): retain the native terminal fence without its covered prefix 2026-10-01 16:51:46 +08:00
ldm0 4a5e28d119 refactor(test): share CDP completion with renderer events 2026-10-01 16:51:46 +08:00
ldm0 cb28d957e1 refactor(cdp): share CSS inventory notification payloads 2026-10-01 16:51:46 +08:00
ldm0 30b7d61eb4 refactor(cdp): project native terminals with other renderer records 2026-10-01 16:51:46 +08:00
ldm0 429847e98a refactor(renderer): use one document serialization command 2026-10-01 16:51:46 +08:00
ldm0 0b892ccb59 refactor(cdp): reuse Emulation admission and transient failures 2026-10-01 16:51:46 +08:00
ldm0 e36271e0d0 refactor(cdp): let preparation select supported native commands 2026-10-01 16:51:46 +08:00
ldm0 7cef1b4e51 refactor(cdp): remove single-variant DOM and AX work wrappers 2026-10-01 16:51:46 +08:00
ldm0 117dce412b refactor(cdp): share node lookups with explicit chain execution 2026-10-01 16:51:46 +08:00
ldm0 6e30806c72 refactor(cdp): register remote objects from the terminal payload 2026-10-01 16:51:46 +08:00
ldm0 0c3b9cd6d3 refactor(cdp): format native replies without adapter output plans 2026-10-01 16:51:46 +08:00
ldm0 88639900ac test(fetch): wait for child document decoding message
Wait for the child document decoding result to arrive through its queued message task before reading the serialized parent document. Preserve the existing Shift_JIS content assertion and use the browser's bounded event-driven wait to remove the race between fetch completion and message delivery.
2026-10-01 05:41:44 +08:00
ldm0 d3f4d43d98 fix(window): expose native closed accessors 2026-10-01 05:40:16 +08:00
ldm0 565c84adbf fix(messaging): preserve MessagePort endpoints across document lifecycle 2026-10-01 05:38:51 +08:00
ldm0 a2dc94d6b2 fix(window): expose status through native string accessors 2026-10-01 04:01:07 +08:00
ldm0 03c8e143e6 refactor(renderer): return anyhow errors from bridge identity lookups 2026-10-01 04:00:26 +08:00
ldm0 caaf1f4e5a fix(dom): preserve trailing dots in document.domain
Preserve the trailing dot returned by the URL host parser when reading or assigning document.domain. Removing that dot incorrectly treats dotted and undotted hosts as the same origin-domain.

Keep the existing public-suffix and registrable-domain checks. Regressions cover literal, repeated, percent-encoded and IDNA dots, parent-domain relaxation, main documents, inherited or independently navigated frames, and navigated popups.
2026-10-01 03:53:50 +08:00
ldm0 7f98be640a fix(dom): validate Document insertion before mutation
Validate Document appendChild and insertBefore before removal or adoption. Existing roots and doctypes remain in the validation sequence, including the detached bridge, so an invalid insertion fails without changing the tree.

Regressions cover main, iframe, windowless and parsed documents, root reinsertion, invalid fragments, allowed comments and processing instructions, and unchanged ranges, observer records and custom-element reactions. Initialize legacy fixtures with a valid HTML shell while preserving their feature assertions.

The validation order follows the DOM pre-insert algorithm: https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
2026-10-01 03:52:41 +08:00
ldm0 edd0057eed fix(webidl): validate observer receivers and isolate native state
Author properties can currently overwrite MutationObserver and IntersectionObserver identifiers or options, and invalid receivers can reach observer callbacks. Use the existing native receiver checks and V8 private slots for observer identity and configuration.

Freeze IntersectionObserver thresholds, return fresh chronological PerformanceObserverEntryList sequences, and correct observer method lengths. Regressions cover cross-realm genuine and forged receivers, conversion order, queue isolation, frozen thresholds, and independent result arrays. Update the local ported PerformanceObserver IDL fixture to its optional dictionary signature.

Keep duplicate IntersectionObserver thresholds after sorting, as required by the initialization algorithm: https://www.w3.org/TR/intersection-observer/#initialize-new-intersection-observer
2026-10-01 03:50:27 +08:00
ldm0 b3ef2ec3e3 fix(webidl): validate Event receivers with native brands
An invalid receiver can reach Event callbacks, including a native initEvent path that can abort the process. Enable the existing WebIDL receiver checks on Event and the event interfaces already present on main, before callbacks and argument conversion.

Genuine events and inherited event interfaces remain usable across realms. The regression matrix rejects forged objects, author and revoked Proxies without evaluating conversion hooks or Proxy traps, and checks TypeError in the callee realm. Existing spoofing tests retain their real-object assertions and now require TypeError for invalid receivers.
2026-10-01 03:49:21 +08:00
ldm0 75b191092d fix(cdp): keep DOM agent commands available while paused 2026-10-01 03:33:13 +08:00
ldm0 13877aa2bf test(cdp): lock renderer reply ordering in smoke 2026-10-01 03:33:13 +08:00
ldm0 f62894ec3c refactor(cdp): publish Emulation replies with exact replay ownership
Use the shared frontend admission and native terminal path for renderer
configuration. Keep Browser replay policy on its captured owner, record
admitted idle state, and project a fallback only if publication lost.

Verify mixed native replies precede later Inspector replay and that
isolate-entering configuration waits for the suspended owner to resume.
2026-10-01 03:33:13 +08:00
ldm0 69b3f96239 refactor(cdp): publish DOM and debugger replies with ordered state updates
Migrate node queries, edits, focus, files, remote objects, DOMDebugger and
Autofill to renderer-owned terminals. Freeze document notifications and
object registry updates at the producer boundary, preserve object aliases,
and keep isolate-entering lookup chains on the owner turn.
2026-10-01 03:33:13 +08:00
ldm0 44011a899c refactor(cdp): publish CSS and accessibility replies at the renderer
Run native lookups and bounded continuations through the shared terminal
path. Publish stylesheet inventory notifications before ready responses,
and preserve exact owner routing in direct Page test fixtures.

Use the parsed fixture and stylesheet notification boundary to verify
Page and CSS commands preserve their independent isolate-entry requirements.
2026-10-01 03:33:13 +08:00
ldm0 a18314640a refactor(cdp): publish native terminals through the renderer journal
Share terminal authority with Inspector and publish ready native replies
after their renderer facts, independently of adapter polling. Keep typed
internal completions separate and settle caches against the exact residence.

Define exhaustive backend entry requirements for nested Main dispatch and
release Main and IO admission at backend entry. Bind native continuations
and preserve their owner lifecycle before terminal projection.

Migrate Page and DOMSnapshot through the generic operation boundary,
including live tree URLs, initial DocumentLoader identity, document capture
and isolated worlds. Cover cancellation, retirement and pause ordering,
and release held popup fixture routes before awaiting initialization.
2026-10-01 03:33:13 +08:00
ldm0 89863e976c fix(cdp): replay Runtime notifications before enable responses
Publish existing contexts, console messages and exceptions before the
Runtime.enable terminal for pages and workers. Check the enable boundary
without a compensating command, and retain deferred reply progress.
2026-10-01 03:33:13 +08:00
ldm0 f98088d297 fix(history): resolve queued joint steps independently of realm anchors
A joint traversal stores the initiating realm current entry only as an admission anchor. Resolve the stable joint step against the owning Window instead of rejecting an isolated-realm anchor against the default realm entry list. Preserve entry validation for traversals without a joint step.
2026-10-01 03:33:13 +08:00
ldm0 eb37fce1a3 chore(release): update version to 1.1.12 v1.1.12 2026-09-30 23:46:27 +08:00
ldm0 8fbf13300c fix(svg): reject trailing decimal path numbers 2026-09-30 22:57:34 +08:00