Commit Graph
1596 Commits
Author SHA1 Message Date
ldm0 d6f905fbfb perf(webmcp): reuse form candidates within each mutation batch 2026-10-05 15:25:06 +08:00
ldm0 82f125e641 refactor(webmcp): remove redundant invocation state and form scans 2026-10-05 15:25:06 +08:00
ldm0 823e98491c test(webmcp): move numeric conversion cases into core crate 2026-10-05 15:25:06 +08:00
ldm0 7c0f2b78a2 refactor(webmcp): prepare form registration tasks once 2026-10-05 15:25:06 +08:00
ldm0 0d4d90977e refactor(webmcp): share form choice and checked-state handling 2026-10-05 15:25:06 +08:00
ldm0 35755220e9 refactor(webmcp): share committed document security origin queries
Use owner-backed security origins for tool registration, Permissions Policy inheritance and navigation results. Keep the child commit query independent of the adapter document map and preserve inherited blank and opaque sandbox origins.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19396 passed, 16 skipped). Then 75 targeted tests passed all 20 stress iterations without retries, followed by another full Nextest run with the same result.
2026-10-05 15:25:06 +08:00
ldm0 ca436657cc perf(webmcp): synchronize affected forms from the native index
Track dirty form handles, preserve shadow-including order for duplicate names, and match definitions by handle. Unrelated DOM changes no longer rebuild every schema. Association changes, removed external controls and cross-document adoption refresh the affected document candidates, including the control's former document. Conflicting candidates remain discoverable independently of registration success.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19396 passed, 16 skipped). All 75 targeted WebMCP tests passed 20 stress iterations without retries. The 21 conflict-recovery scenarios cover light DOM and open/closed shadow trees, including removal and disassociation of external controls after the imperative tool releases the name. Regressions also cover zero schema traversals for 8000 unrelated insertions beside 32 tools, one schema per field update, external controls and labels, fieldsets, and cross-document adoption in both directions.
2026-10-05 15:25:06 +08:00
ldm0 f603f4dbb1 refactor(webmcp): keep callback registration state with its executor
Keep registration identity, acknowledgement and abort state on imperative callbacks. Declarative forms no longer allocate registration IDs or carry unused callback fields. Preserve identity checks for stale acknowledgements and abort algorithms.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19392 passed, 16 skipped), including callback-to-form replacement before acknowledgement.
2026-10-05 15:25:06 +08:00
ldm0 7b16cf0266 perf(webmcp): release inputs and build CDP events on demand
Move serialized input out when execution starts, retain registration stacks for enable replay, and construct protocol snapshots only for subscribed sessions. Move the final event to its session instead of cloning it again.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19391 passed, 16 skipped).
2026-10-05 15:25:06 +08:00
ldm0 45a34211e7 test(webmcp): port pinned Chromium compatibility coverage
Vendor 71 imperative and declarative WebMCP fixtures from Chromium revision
2d184faab9fb11e1070fb1eeafebf291f6e85923 with source metadata and license
attribution. Register their expected results in the WPT compatibility suite.

Serve root WebMCP fixture assets and resolve the additional alternate domain
used by the cross-origin cases. Cover discovery, schemas, execution, permissions,
events, cancellation, navigation, and native form lifecycle.

Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [ 101.682s] 19391 tests run: 19391 passed, 16 skipped
Native input probes: temporal mismatch, fractional stepping, sub-millisecond
steps, and number controls preserve the main branch behavior.
Full CDP smoke: 52/52 passed.
2026-10-05 15:25:06 +08:00
ldm0 c345a594f4 feat(webmcp): implement document tools and CDP integration
Expose secure Document.modelContext APIs with document-owned registrations,
callback realm and input validation, task-based result delivery, and independent
caller cancellation and target completion. Preserve cancellation reasons and
emit lifecycle events only for live owners.

Register native declarative forms in light and shadow trees through indexed
mutation candidates. Track schema changes to valid forms even before a
registration succeeds, including controls associated through a form attribute.
Use changed containers only for ancestor and form-owner checks; inspect added
and removed subtrees for discovery. Retire registrations at actual removal and
owner transitions while preserving submit handling and captured pending responses. Apply validated
fill intents to current options and checkable values in control event order.

Compute tools delegation from committed security origins, ancestor header
allowlists, container declarations, redirects, and combined sandbox policies.
Carry invocation identity, original origin, and resolved target through form
navigation; accept same-origin JSON-LD results and reject cross-origin commits.

Connect typed renderer observations to CDP discovery, invocation, cancellation,
and Runtime result projection. Include renderer and protocol regression coverage
for document lifetime, reentrancy, permissions, dynamic controls, and cancellation.

Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [ 100.619s] 19320 tests run: 19320 passed, 16 skipped
2026-10-05 15:25:06 +08:00
ldm0 ca0a4c81a2 feat(webmcp): add native form schemas, fill intents, and activity states
Introduce moli-webmcp for native form schema synthesis, complete input validation,
numeric conversion, and JSON-LD results. Preserve requested selection values in
fill intents so the renderer can apply them to current controls after author
input events.

Add native tool activity states, selector support, control helpers, and
a namespace-aware form index that includes open and closed shadow trees.
Pin the Stylo revision providing the activity pseudo-classes.

Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [  98.804s] 19248 tests run: 19248 passed, 16 skipped
2026-10-05 15:25:06 +08:00
ldm0 167d1e0195 chore(release): update verstion to 1.1.14 2026-10-05 14:52:42 +08:00
ldm0 cb1ed2b52c docs: add Trendshift badges to README 2026-10-05 14:52:42 +08:00
ldm0 a3f792d2ad test(events): cover native abort event trust and dispatch cleanup 2026-10-05 14:17:07 +08:00
ldm0 235cdd86ac fix(xhr): order upload startup events and snapshot listeners 2026-10-05 14:16:45 +08:00
ldm0 d87acfc6d8 test(history): cover replaced initial child entries during back 2026-10-05 05:35:44 +08:00
ldm0 79aa5026e9 test(fetch): cover Request header list copying through clone and Cache 2026-10-05 05:33:55 +08:00
ldm0 d9dc53524b fix(worker): select module source format from response MIME 2026-10-05 05:32:12 +08:00
ldm0 6f9e3a3270 test(wpt): cover trickle response streaming and upload ordering 2026-10-05 05:26:34 +08:00
ldm0 4b4fd2e7f3 feat(media): expose the native MediaRecorder interface shell 2026-10-05 05:26:00 +08:00
ldm0 0423b34df4 test(wpt): allow worker errors within the case timeout 2026-10-05 05:26:00 +08:00
ldm0 99f18435ed test(cdp): check debugger retirement after navigation commits 2026-10-05 05:26:00 +08:00
ldm0 815ab6bbcd feat(webidl): support signed short argument conversion 2026-10-05 05:24:54 +08:00
ldm0 f4ee76bffa fix(wpt): honor CORS opt-in for common redirects 2026-10-05 05:21:30 +08:00
ldm0 b12ef6a0a7 fix(html): expose frame content accessors on owner prototypes 2026-10-05 05:20:49 +08:00
ldm0 6352114d19 fix(html): expose Document lifecycle members with native receivers 2026-10-05 05:20:26 +08:00
ldm0 3063134daf test(cdp): enable Runtime before replaying child navigation bindings 2026-10-05 05:20:01 +08:00
ldm0 fe7bd9ad20 refactor(html): query inert attribute presence directly 2026-10-05 05:19:36 +08:00
ldm0 e10d2a7713 test(fetch): assert empty request body framing 2026-10-05 05:19:04 +08:00
ldm0 2f6d363ebf test(import-map): keep unresolved keys available to later maps 2026-10-05 05:18:52 +08:00
ldm0 301b29a38c test(dom): preserve MIME types in document clone coverage 2026-10-05 05:18:34 +08:00
ldm0 50d5387bb5 test(fetch): cover empty repeated fields during Headers forEach 2026-10-05 05:18:15 +08:00
ldm0 6f390355b3 test(cdp): synchronize superseding navigation through shared waiters 2026-10-05 05:17:31 +08:00
ldm0 d89d17a568 test(csp): cover encoded commas across policy parsing and URL matching 2026-10-05 05:17:15 +08:00
ldm0 d3f7407472 test(history): await child fragment traversal completion explicitly 2026-10-05 05:17:00 +08:00
ldm0 fc2a45a9eb test(webdriver): wait for form navigation with BiDi attached 2026-10-05 05:16:44 +08:00
ldm0 c3b24ea097 test(html): cover initial empty iframe document reload 2026-10-05 05:16:28 +08:00
ldm0 57ced0b0c4 test(fetch): cover UTF-8 BOM decoding in Response streams 2026-10-05 05:13:53 +08:00
ldm0 d166de2132 fix(test): document write with custom elements 2026-10-05 05:11:52 +08:00
ldm0 12a812d374 fix(smoke): drain popup route callbacks before cleanup 2026-10-05 05:11:52 +08:00
ldm0 20b370baa3 feat(events): expose the native HashChangeEvent constructor 2026-10-05 04:47:35 +08:00
ldm0 a559303a08 fix(svg): reflect length attributes on detached XML elements 2026-10-05 04:46:49 +08:00
ldm0 0c9f4775d1 test(fetch): cover opaque request origins across sandbox and CORS 2026-10-05 04:24:18 +08:00
ldm0 c2a927f105 fix(fonts): validate every decoded font table extent 2026-10-05 04:22:55 +08:00
ldm0 144eb02540 fix(custom-elements): honor owner registries during parser construction 2026-10-05 03:54:08 +08:00
ldm0 a483ff3c76 fix(indexeddb): mark native version-change events trusted 2026-10-05 03:44:22 +08:00
ldm0 0810c974ef refactor(navigation): centralize history entry wrappers 2026-10-05 03:43:44 +08:00
ldm0 307feab20c fix(navigation): construct native events in their target realm 2026-10-05 03:43:44 +08:00
ldm0 3d504a198e refactor(fetch): share quoted HTTP header list splitting 2026-10-05 03:42:50 +08:00