Commit Graph
3370 Commits
Author SHA1 Message Date
ldm0 2d22d593b7 fix(html): apply export policies throughout template contents
Filter the template contents that are actually serialized and include reachable author shadow roots owned by inert Documents. Preserve inert iframe attributes without parsing or loading their raw srcdoc, and leave the live source unchanged.
2026-11-13 19:26:46 +08:00
ldm0 129b8cf640 refactor(renderer): unify read-only HTML document exports
Route page HTML, JSON and MHTML through SerializeDocument options and keep Markdown on its own command. Stream live frame Documents into srcdoc without cloning or editing DOM state, and remove copy-specific helpers. Finish core commands consistently and retain paired document metadata across auxiliary trace serialization.
2026-11-13 19:26:46 +08:00
ldm0 e2a7ff13c8 refactor(dom): add read-only HTML serialization options
Stream embedded Documents through the existing explicit traversal and keep shadow-root selection independent from its markup profile. Add bounded output, virtual insertions, output filtering, and opt-in DOM access probes. Keep ordinary output free of per-node export checks and nested escaping work.
2026-11-13 19:26:46 +08:00
ldm0 bfeadd5a6f fix(cli): preserve matched network traces during document export 2026-11-13 19:26:46 +08:00
ldm0 7fa75eb878 fix(wpt): serve ServiceWorker scope redirect delegates
Source-commit: 48640c3bf7
2026-11-13 19:18:17 +08:00
ldm0 8f139fd884 refactor(cdp): generate discovery schema at build time 2026-11-13 17:58:54 +08:00
ldm0 a788001aae perf(cdp): buffer protocol schema decoding 2026-11-13 17:58:54 +08:00
ldm0 d1473e962f build(cdp): embed protocol metadata with Brotli quality 11 2026-11-13 17:58:54 +08:00
ldm0 bc6ffe8870 fix(protocol-server): advertise Tracing result events 2026-11-13 17:58:54 +08:00
ldm0 312def0b39 test(cdp): consume discovery schema with a generated client 2026-11-13 17:58:54 +08:00
ldm0 6fe7d26fb3 fix(protocol-server): publish complete supported CDP schemas 2026-11-13 17:58:54 +08:00
Neo 孫 b6465b00c3 fix(protocol-server): advertise every implemented CDP domain in /json/protocol
/json/protocol served V8's js_protocol verbatim (Schema, Runtime, Debugger,
Console, Profiler, HeapProfiler), while the dispatcher implements 29 more
domain groups (Page, DOM, Network, Target, Input, Emulation, ...). Clients
that gate calls on the advertised protocol refused commands Moli supports.

- Derive strum::VariantNames on the action enums the dispatcher parses
  methods against, and expose moli_protocol::implemented_cdp_commands()
  (domain -> wire command names). Generated from the implementation, so
  it cannot drift.
- /json/protocol merges that list into the V8 schema once (OnceLock):
  V8 domains keep full schemas and gain any missing command names;
  Moli-implemented domains list command names only, with a description
  saying parameter schemas are not published.
- The embedded CDP_PROTOCOL_JSON constant is unchanged, so
  embedded_protocol_preserves_the_complete_vendored_schema still holds.

Tests: wire names (getFullAXTree, getDOMStorageItems, navigate; 29
domains) and the discovery endpoint test now asserts Page / DOM /
Network / Target / Runtime / Input and Page.navigate are advertised.
Reverting to the verbatim V8 schema fails it ("must advertise Page").
fmt and clippy -D warnings clean for both crates.
2026-11-13 17:58:54 +08:00
ldm0 b85c5fde5b fix(paint): apply SVG text ancestor transforms exactly once 2026-11-13 17:32:47 +08:00
ldm0 176a49a7d0 fix(svg): observe changed scenes with a coherent complete layout 2026-11-13 17:32:47 +08:00
ldm0 78eceb89a0 fix(svg): share one published scene between geometry and paint 2026-11-13 17:32:47 +08:00
ldm0 690cea9e44 fix(layout): freeze SVG object geometry with its viewport 2026-11-13 17:32:47 +08:00
ldm0 f56fe0fe18 fix(image): keep final SVG styles separate from source XML 2026-11-13 17:32:47 +08:00
ldm0 bfc13d41d3 fix(svg): provide graphics client rects for measured charts
Resolve SVG object bounds and shaped text through the shared styled SVG scene, then map them through the outer CSS viewport. Project descendant computed styles without mutating the live DOM, preserving use-instance inheritance and outer transform ownership.

Cover chart measurement and paint, Chromium-calibrated SVG geometry, referenced shapes, and the formerly empty circle client rectangle.
2026-11-13 17:32:47 +08:00
ldm0 ccbd6d09a2 refactor(webapi): declare shared Window access policies 2026-11-13 17:25:23 +08:00
ldm0 d75a43c7ca fix(network): preserve Window referrers through Service Workers
Source-commit: da4cc29333
2026-11-13 16:35:08 +08:00
ldm0 ea71094307 fix(window): enforce frameElement origin checks
Source-commit: ddd3d125ca
2026-11-13 16:30:24 +08:00
ldm0 15724a315f fix(dom): clear child Document handlers without author setters
Source-commit: f0430b350b
2026-11-13 16:24:49 +08:00
ldm0 fd83392ebc bench(inspector): scope deep fixtures to projected handles 2026-11-13 16:16:49 +08:00
ldm0 0da8d7623e refactor(inspector): derive partial response handle projections 2026-11-13 16:16:49 +08:00
ldm0 082f4b4b82 test(inspector): clarify work-item byte accounting 2026-11-13 16:16:49 +08:00
ldm0 55fda79521 fix(runtime): avoid rescanning user values in dispatcher completion 2026-11-13 16:16:49 +08:00
ldm0 9eafed1f5b fix(runtime): unify response handle and object group registration 2026-11-13 16:16:49 +08:00
ldm0 8357f19c94 perf(inspector): scan deeply serialized responses in linear time 2026-11-13 16:16:49 +08:00
ldm0 38d648a018 bench(inspector): cover real V8 deep serialization 2026-11-13 16:16:49 +08:00
ldm0 46b6898db3 bench(inspector): measure Runtime handle projection memory and time 2026-11-13 16:16:49 +08:00
ldm0 4b9c8a3774 perf(runtime): register response handles without materializing values 2026-11-13 16:16:49 +08:00
ldm0 f387d37e2c test(fetch): cover cache states during request revalidation
Source-commit: a5c392ba01
2026-11-13 15:56:21 +08:00
ldm0 ff2e142cc6 fix(service-worker): create register promises in the container realm
Source-commit: 1791519a7d
2026-11-13 15:34:18 +08:00
ldm0 0f0629a94d fix(policy): delegate opaque iframe src permissions
Source-commit: 2d20fee937
2026-11-13 15:27:49 +08:00
ldm0 ecb5ec5d39 fix(renderer): retain Page window identity through target close
Reuse the Page-owned browsing context name cell and auxiliary identity when
bootstrapping a replacement Document after target lookup entries are removed.
Keep first-document registration and identity assertions intact.

Cover unregister-before-bootstrap deterministically and exercise in-flight
navigation closure through the default CDP target lifecycle smoke.
2026-11-13 03:32:14 +08:00
ldm0 aec9cd8f2a test(wpt): refresh full release cases after regression fixes
Record the complete all-profile CDP run of source 1344d8d26d with 50 workers,
the unchanged 120-second outer deadline and WPT db95fafd1f. All 14,065
selected cases are present, including 442 IndexedDB entries; case selection
and execution order match the first full run.

Results: 10,405 pass, 3,426 fail, 224 timeout, 6 error, 3 harness-stalled,
1 crash. Passes increase by 35 from the tracked lists and by 10 from the
unfixed release run, with no new pass-to-nonpass transitions against that run.

The five fixed WPT cases pass in the complete run and in 5/5 targeted rounds.
Retain the observed iframe failure and Trusted Types timeouts: the old
release also fails the iframe case, and all three Trusted Types variants
have old-release timeout evidence, including 4/10 concurrent runs for 36-last.
Document-write MutationObserver subtest variation also reproduces on the
old release. Do not replace full-run statuses with selective retry results.

Release SHA256: 494b20e2bdd6730cbc855d1f25919453b16755964c74cc4bada3f526eefe58af
2026-11-13 03:28:46 +08:00
ldm0 52587f3c37 fix(script): keep currentScript in its execution Document
A running script can be adopted into another Document without changing the
source Document's currentScript. Query the main execution stack for the
main Document rather than filtering by the node's new ownerDocument;
retain the existing per-child-Document stack and shadow visibility checks.

Dynamic inline error reporting exposed this pre-existing bug as a WPT
failure. A direct old-release probe also returns the wrong currentScript,
so the old WPT pass was masking the exception rather than proving correct
behavior. Cover adoption, the destination's null value and stack restoration.
2026-11-13 03:28:46 +08:00
ldm0 910e4d798e fix(cache): reify native Request keys without URL conversion
Cache.keys rebuilt stored native requests through the author Request
constructor. Credential-bearing URLs supplied by XHR are valid internal
identities but public URL conversion now rejects them, leaving the Cache
Storage credentials WPT waiting for a worker reply.

Use the existing native Request declaration to restore cached keys without
calling author constructors. Retain the public credential validation and
cover three distinct credential URLs, headers, cloning and a replaced
Request constructor.
2026-11-13 03:28:46 +08:00
ldm0 54546adf32 fix(paint): align overflow clips with snapped box edges
Overflow clip geometry retained fractional layout offsets while its box
background used snapped paint geometry. Atomic flow grouping changed which
background and text commands shared a clip layer, exposing different edge
blending in three grid scrollbar reftests (240 pixels, max difference 17).

Snap owned overflow clips in the same pre-transform paint space as box
backgrounds. Preserve CSSOM geometry, property transforms and clip-chain
reuse. Cover block and grid containers with fractional offsets and sizes.
2026-11-13 03:28:46 +08:00
ldm0 86a05bd7ce fix(service-worker): use native Window containers for notifications
Source-commit: 456fc31a2d
2026-11-13 02:35:06 +08:00
ldm0 3650a74c6a fix(navigation): honor cancellation before revealing fragment targets
Source-commit: e426ce91da
2026-11-13 02:22:08 +08:00
ldm0 f7bb6f6421 fix(window): reject deleting live indexed children
Source-commit: 3354a1a4c0
2026-11-13 02:20:13 +08:00
ldm0 071e553e5b refactor(dom): name atomic move semantics consistently 2026-11-13 02:01:36 +08:00
ldm0 1ed0e2238e fix(cdp): apply late request policy before commit projection
A newly committed native Document can execute before its commit output has
been projected into protocol state. Routing Fetch.enable through the
projected binding then updates a loaded predecessor or no Page at all,
allowing requests to bypass interception after a successful ACK.

Address restricted request-policy updates to the synchronously admitted
renderer Page and wait for native completion. Reuse this route for Fetch
cleanup and blocked URLs without granting general unbound Document access.

Hold actual native commit publications in the regression and inspect the
exact evaluation output fence. Cover new/replaced Pages with interception
enable/disable and blocked URLs, with no external I/O in negative controls.
The original controlled reproducer fails 3/3 on the rebase baseline.

Validation: fmt; workspace/all-targets/all-features Clippy; 23,026 Nextest
passed, 20 skipped; three targeted tests x20 and 30 module tests x5, all
without retries.
v1.1.24
2026-11-13 01:42:40 +08:00
ldm0 bf819ba3ce fix(dialog): read closedby from the null namespace 2026-11-13 01:42:40 +08:00
ldm0 8348e735d2 fix(dialog): honor closedby none for Escape requests
Honor closedby=none before dispatch and after cancel listeners. Match Chromium case handling and invalid-value defaults, keep script closure available, and cover dynamic policies and a disabled topmost modal.
2026-11-13 01:42:40 +08:00
ldm0 e454dd9cc3 fix(dialog): clear modal registration on node removal and adoption
Clear native modal state and the old Document registration when connected nodes are removed or adopted. Keep validated atomic moves in their original opening and priority, including the split DOMDebugger path. Cover light and shadow subtrees, adoption and background inertness.
2026-11-13 01:42:40 +08:00
ldm0 523f0ba783 fix(dialog): bind Escape close requests to one modal opening
Capture the Document, dialog and opening generation before cancel dispatch and verify them before closure. Removing open invalidates the request without clearing modal registration. Cover close/reopen, nonmodal reopen, raw attribute toggles, no-op operations and exact queued close-event counts.
2026-11-13 01:42:40 +08:00
ldm0 51b3dd516a fix(dialog): use internal keyboard state for Escape
Read the trusted keyboard key from its internal backing so page-owned properties and prototype getters cannot change the Escape default action.
2026-11-13 01:42:40 +08:00
ldm0 454052c5a9 fix(dialog): dismiss modals in opening order per document 2026-11-13 01:42:40 +08:00