Commit Graph
1609 Commits
Author SHA1 Message Date
ldm0 24ef334500 fix(renderer): replace the Service Worker client on initial Document commit 2026-10-06 01:01:03 +08:00
ldm0 85332301b2 fix(renderer): disable subframe loading during document retirement 2026-10-06 01:01:03 +08:00
ldm0 fcadef16be fix(renderer): protect Document access and retained realm identity 2026-10-06 01:01:03 +08:00
ldm0 f9837b4ad5 fix(cdp): harden popup realm transitions
Enforce document and Location authority at realm boundaries, preserve Window-owned timer and Service Worker completion state across initial commits, and retire isolated-world IndexedDB handles without pinning the old realm.
2026-10-06 01:01:03 +08:00
ldm0 84cdb55797 test(cdp): add reproducible Chromium multipage comparisons
Add bounded fixed and random Chromium/Moli comparisons for target lifecycle,
window activity, named-window reuse, opener references and navigation inheritance,
plus a real DevTools frontend probe. Preserve action replay, raw protocol evidence
and target/session mappings while normalizing observed equivalent focus-event
orders and retaining exception identity in comparisons.

Validation: PYTHONPATH=moli-benchmark moli-benchmark/.venv/bin/python -m unittest discover -s moli-benchmark/tests -p test_multipage_cdp_fuzz.py -v.
2026-10-06 01:01:03 +08:00
ldm0 30e36e64a3 fix(cdp): preserve auxiliary Page ownership through document navigation
Create script auxiliary Pages synchronously and let their CDP targets adopt
those exact Pages. Preserve Page and WindowProxy identity through document
navigation, sharing browsing-context names, opener references, message endpoints
and close state with related windows.

Commit browser responses into the existing Page with exact document admission,
cancellation and failure disposition. Capture accepted navigation origin, base,
policy, storage and referrer, preserve auxiliary history and restore related
browsing-context groups without issuing duplicate popup requests.

Reuse the initial same-origin Window while replacing its Document, and centralize
Document owner transitions, descendant retirement and Inspector publication.
Give related Pages independent Inspector routes and shared per-Page startup
pause state, route isolate foreground work through surviving Pages, and cache
cross-origin Window functions in each accessing realm with receiver-aware access.

Cover actual popup state, navigation and parser rebinding, accepted environments,
history, cross-origin access, multiple frontends, cancellation and task retirement.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-06 01:01:03 +08:00
ldm0 f1c5bf6618 fix(cdp): separate browser window selection from document activity
Track each window's selected tab and browser focus independently of protocol
page routing. Keep window bounds, adjacent-tab close selection, discovery and
target metadata consistent with their owning windows and documents.

Queue renderer activity updates outside the CDP actor, preserve their output
fences and remember admitted activity so focus reversals survive a busy page.
Cover window selection, focus-event state and busy-context activation.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-06 01:01:03 +08:00
ldm0 9fd3e07f47 fix(renderer): retain detached document state until realm collection
Retain native DOM, Blob, AbortSignal and intrinsic interface backing while
JavaScript still holds a retired realm. Retire active execution resources and
trace wrapper and traversal-filter ownership through V8 so the last reference
releases the native host without Rust-to-V8 root cycles.

Cover retained native values, realm finalizers and traversal callback lifetimes.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-06 01:01:03 +08:00
ldm0 19667e531a perf(dom): better inline script performance v1.1.14 2026-10-05 20:48:11 +08:00
ldm0 7909cff7b6 feat(playground): add CLI for arbitrary WebMCP sites 2026-10-05 17:01:49 +08:00
ldm0 1b18f0a6bd refactor(playground): share native WebMCP session client 2026-10-05 17:01:49 +08:00
ldm0 bf35b69562 feat(playground): add native WebMCP demos 2026-10-05 17:01:49 +08:00
ldm0 0923d2cefa refactor(webmcp): share registry notifications and invocation aborts 2026-10-05 15:25:06 +08:00
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