Commit Graph
883 Commits
Author SHA1 Message Date
ldm0 d8fd9cfb19 refactor(parser): share mutation effects and isolate tokenizer pauses
Share parser mutation notifications between the main document and child
frames, with each owner retaining its resource and lifecycle work. Update
stylesheet owners incrementally so parser mutations preserve CSSOM edits.
Keep tokenizer pause reasons separate from DOM handle identity.

Add main/iframe regressions for reaction and observer ordering, form
association, stylesheet visibility, CSSOM edits, and nested frame identity.

Validation: cargo fmt --all; strict workspace clippy; cargo nextest run
--no-fail-fast (18,118 passed, 13 skipped).
2026-09-16 21:43:28 +08:00
ldm0 3dcfac5278 fix(parser): preserve reentrant insertion state and reaction order
Flush parser insertion reactions after the tree builder completes its current
token so connected callbacks run before children without retaining parser
borrows across JavaScript execution.

Keep one DocumentParserSession and expose a restricted insertion handle for
nested writes. Share input, suspension, cancellation, and close state so
blocked writes remain queued and outer feeds stop when nested parsing blocks
or replaces the document. Let the owning session finish deferred close and
dispatch readiness transitions once.

Reuse form-owner mutation detection for child parser insertions and add
regressions for reaction order, form association, nested writes, gated external
scripts, document replacement, and deferred close.

Validation: cargo fmt --all; strict workspace Clippy; cargo nextest run
--no-fail-fast (18,104 passed, 13 existing skips); release build.
2026-09-16 21:16:07 +08:00
ldm0 d503f0bea3 Update wpt cases 2026-09-16 21:16:07 +08:00
ldm0 6f5759a0c3 fix(custom-elements): allow pending upgrades in nested reactions
Let an undefined element with a queued upgrade participate in a nested
appendChild() or customElements.upgrade() reaction scope. Use construction
state at execution time to prevent duplicate constructors, and keep failed
upgrade cleanup intact.

Remove pending-upgrade checks from lifecycle enqueueing so a remaining
duplicate upgrade cannot suppress a successful upgrade's form callback.
Drop the unused queue membership helpers.

Add regressions for nested insertion and explicit upgrade, initial form
association, and constructor failure. Correct two fragment parser ordering
assertions after verifying the same scripts against local Chromium 147.

Validation: cargo fmt --all; workspace clippy with all targets and features
and -D warnings; 17,803 nextest tests passed, 13 skipped. All 75 subtests in
the seven affected WPT pages pass. The custom-elements directory passes
163/165 pages, with the same two remaining failures as the prior run.
2026-09-16 21:16:07 +08:00
ldm0 dd650eb96b fix(custom-elements): queue insertion upgrades in tree order
Queue either a connected callback for an existing custom element or an upgrade for an undefined element. Let the upgrade own its initial connection callback instead of synchronously upgrading the subtree and enqueueing connections again.

Cover option and ordinary containers, reconnection, and mixed upgraded/undefined sibling order against Chromium. HTMLOptionElement WPT passes; workspace fmt, clippy, and all 17800 nextest tests pass.
2026-09-16 21:16:07 +08:00
ldm0 1a02d17bf6 fix(custom-elements): integrate child document parser construction
Use the shared custom element construction path in the child realm and deliver parser mutation records and lifecycle reactions. Give child document streams CEReactions scopes so writes finish reactions without premature microtask checkpoints.

Add regressions for synchronous construction, parser mutation batches, nested JavaScript, and dynamic markup guards. The five affected WPT pages pass all 46 subtests; workspace fmt, clippy, and all 17798 nextest tests pass.
2026-09-16 21:16:07 +08:00
ldm0 f3c87f394d fix(fetch): bypass interception for local blob and data URLs 2026-09-16 18:54:13 +08:00
ldm0 0c037567ce fix(webidl): preserve record conversion order 2026-09-16 17:08:44 +08:00
ldm0 b0780fbe0e fix(webidl): retain enumerable symbol record keys 2026-09-16 17:08:44 +08:00
ldm0 e2f23992bb fix(xhr): apply enum attribute rules to responseType
Ignore unknown responseType values after string conversion and before XHR state checks. Preserve conversion exceptions, ignore document in workers, and validate the native receiver in the accessor realm.

Source: db79f4a746
2026-09-16 17:03:04 +08:00
ldm0 18bab6d67b fix(webidl): complete sequence conversion before validating pairs
Propagate WebIDL sequence conversion errors without IteratorClose. Convert all inner sequences before validating URLSearchParams pair lengths or normalizing Headers, preserving getter order and conversion exceptions.

Source: afe693c9a3, 4a420981c3
2026-09-16 17:02:20 +08:00
ldm0 b47fab8bcd fix(file-api): authorize blob URL revocation by storage key
Store the URL creator’s browser partition and storage key separately from its backing Blob, and check authorization atomically with URL removal. Use the Worker environment storage key and a shared opaque-origin nonce allocator for Windows and Workers.

Source: e090f2b070
2026-09-16 16:32:31 +08:00
ldm0 65616592dc fix(wpt): serve XHR response status and last-modified fixtures
Preserve status text, raw payloads, method headers, XML contents and file modification times for the two upstream XHR fixtures. Support HEAD and custom methods and close responses without waiting for unused uploads.

Source: 3d04d737e7
2026-09-16 16:23:53 +08:00
ldm0 b5eb73989e chore(release): update version to 1.1.7 2026-09-16 16:20:32 +08:00
ldm0 2fc0dca74e docs: remove screencast interval from readmes 2026-09-16 16:19:03 +08:00
ldm0 c689e4adf8 fix(modules): expose inline import meta base URLs
Compile inline modules with their document base URL and read import.meta.url from the V8 module resource name. Preserve separate internal module-map identities and cover both page and child inline modules.

Source: f8de9b7ed0
2026-09-16 16:17:55 +08:00
ldm0 ae10292ea4 fix(markdown): preserve inline code breaks and nested emphasis 2026-09-16 16:07:15 +08:00
ldm0 61dbf7ea3e feat(markdown): introduce moli-html2md 2026-09-16 16:07:15 +08:00
ldm0 a4fd2b9701 fix(fetch): send zero content length for bodyless PUT requests
Configure an empty upload for a bodyless PUT and suppress libcurl’s implicit Content-Type on that path. Recompute framing across redirects, retaining PUT for 301/302/307/308 and dropping the body headers when 303 changes it to GET.

Source: f84c99d671
2026-09-16 15:39:45 +08:00
ldm0 8bcdbb299d fix(fetch): reject non-GET blob URL requests
Pass the normalized request method through local resource resolution for Window and Worker fetch, XMLHttpRequest, navigation, streaming and callback consumers. Reject non-GET blob requests locally while preserving data URL behavior and asynchronous XHR completion.

Source: 0ee4db49df
2026-09-16 15:38:26 +08:00
ldm0 e688652948 feat(cli): configure screencast intervals in milliseconds
Replace --cdp-screencast-fps with --screencast-interval. Accept positive
integer milliseconds, retain the --layout requirement, and default to
1000 ms. Pass the interval through server configuration and multiply the
Duration by everyNthFrame without converting through integer FPS.

Update CLI help and English/Chinese docs. Cover parsing, defaults, rejected
values and the removed flag, precise deadlines, and interval multiplication.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast
2026-09-16 14:59:42 +08:00
SpringCorel 48db95c18e refactor(v8): share microtask execution boundaries 2026-09-16 14:59:42 +08:00
ldm0 053d3f604d refactor(v8): centralize JavaScript execution boundaries
Own callback microtask nesting in with_webidl_callback_contexts so operation
lookup, invocation, and return conversion share one boundary. Exit the
incumbent scope before Scoped-policy checkpoints and preserve Auto timing.

Route scripts, functions, modules, and constructors through named renderer
entry points, including worker execution. Keep the generic scope helper
private and remove manual callback wrappers from callers.

Cover microtask policies, exception cleanup, and incumbent cleanup ordering
with regression tests. Guard script and module execution entry points with
the existing source inventory checks.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast
2026-09-16 14:59:42 +08:00
ldm0 e6b08a4e30 fix(dom): create wrappers in their receiver realm
Cached child-document wrappers reapplied their current owner's native prototype,
overwriting JavaScript changes and changing prototypes during adoption. Return
cached wrappers directly and remove the custom-element exceptions and the
owner-document prototype correction from wrapper creation.

Create child Document wrappers in their owning context, deferring creation for
unmaterialized initial empty frames. Choose the receiver's creation context at
DOM return boundaries, including splitText, shadow and template access, forms,
Range and XPath results, and named Window access. Collection indexing and named
access use the collection's context. Keep traversal results and NodeFilter
arguments in the node document's realm as required by NodeWrapInOwnContext.
Wrapper creation uses the selected context's intrinsic interface prototype
without reading author-visible constructors or repairing prototypes later.

Cover changed and null prototypes, adoption, child Document and Range realms,
borrowed DOM methods, property interceptors, collections, replaced public
constructors, and isolated-world wrapper identity. Exercise first access before
other APIs can hide an incorrect creation realm by populating the wrapper cache.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (17,776 passed, 13 skipped)
2026-09-16 14:59:42 +08:00
ldm0 f6b833d288 fix(custom-elements): preserve constructor-selected prototypes
Remove constructor-name-based prototype repair after creation and upgrade.
Keep the prototype set by JavaScript, including null and changes made before
an upgrade fails, and synchronize that actual value across bridge wrappers.
Cached wrappers must retain it during construction and after failure; new
fallback wrappers still receive their owner-realm native prototype.

Add regression coverage for constructor-selected prototypes in the main
document and iframes, plus failed creation's original and fallback objects.
2026-09-16 14:59:42 +08:00
ldm0 9035ba2f5d fix(custom-elements): preserve prototypes on failures before super
Only finalize failed upgrade wrappers if the construction stack shows that HTMLElement construction consumed the pending wrapper. Throwing or returning a different object before super must leave the original prototype intact.

Add main-window and iframe regressions for both failure paths, including discarded attribute and connected reactions.
2026-09-16 14:59:42 +08:00
ldm0 1b214ad088 fix(custom-elements): checkpoint only outside active JavaScript
Expose native MicrotasksScope bindings and use them explicitly at Moli script, module, callback, constructor, and popup execution boundaries. Keep rusty_v8 call APIs unchanged.

Checkpoint custom element constructors before validation only when no outer script or microtask is active. Cover parser, document.write, createElement, and host-owned popup execution; update the document.write reaction-order regression.
2026-09-16 14:59:42 +08:00
SpringCorel c6de50242a fix(nextest): make root_client_metrics_track_window_surface_profile work on all platforms 2026-09-16 14:59:42 +08:00
SpringCorel d58d26e8fb fix(v8): fix undefined image url 2026-09-16 14:59:42 +08:00
SpringCorel 0d6cee5dde feat(cdp): add --cdp-screencast-fps option 2026-09-16 14:59:42 +08:00
SpringCorel 8b9c53d467 fix(v8): fix custom elements reaction pipeline 2026-09-16 14:59:42 +08:00
ldm0 2a3aa78f8d fix(fetch): inherit Headers methods and observe initializer iterators
Use the intrinsic Headers prototype for internally created header objects. Remove own method copies and platform-object initializer shortcuts so author iterator overrides, exceptions and record properties remain observable.

Source: 66434f2877, c229deb38c
2026-09-16 14:43:14 +08:00
ldm0 31fbadca9b fix(selection): respect document and modal inert boundaries
Source: 1354930065, eb2174ed49, f7b96d7940
2026-09-16 14:37:59 +08:00
ldm0 fea71c0f3d refactor(wpt): isolate script load fixture discovery helper
Keep the script load/error discovery helper and its hook separate from the XHR response fixture additions so both independent branches can merge without overlapping insertions.
2026-09-16 14:30:40 +08:00
ldm0 3028654817 fix(wpt): serve script load and error fixtures
Serve the script load/error endpoint as JavaScript with its requested 200 or 404 response and first query value. Recognize exact relative and absolute fixture references for classic and module script discovery.

Source: fdc7857483
2026-09-16 14:30:40 +08:00
ldm0 10a78042fe fix(cssom): append computed custom properties 2026-09-16 13:31:16 +08:00
ldm0 f684e465bc fix(selection): suppress trailing newline whitespace 2026-09-16 05:45:10 +08:00
ldm0 6e505565f2 test(wpt): refresh full cross-run baseline 2026-09-16 05:45:10 +08:00
ldm0 e3ae7c3bd1 fix(wpt): serve script charset fixtures as original bytes
Serve the upstream script Content-Type endpoint with original file bytes and the requested MIME value, including HEAD and empty MIME. Resolve exact relative handler references during case selection.

Source: 9e40fe628e
2026-09-16 02:43:23 +08:00
ldm0 01f5ee6e46 fix(dialog): apply modal UA styles and top-layer state
Source: 639cb1916b, f57c3dd731, cac97d8b9a
2026-09-16 01:54:38 +08:00
ldm0 3cdd95f6d5 fix(selection): preserve collapsed inline whitespace
Source: 2953b56b17
2026-09-15 20:44:01 +08:00
ldm0 312b0ffc6b feat(emulation): support worker user agent overrides v1.1.6 2026-09-15 16:54:51 +08:00
ldm0 e5217a4de1 fix(markdown): preserve whitespace between inline nodes 2026-09-15 16:31:50 +08:00
ldm0 357dda18e7 fix(editing): enforce maxlength with UTF-16 text offsets
Apply maxlength to user text insertion, preserve complete surrogate pairs,
and keep selection and replacement offsets in UTF-16 units. Cover CDP
input, execCommand insertText, and setRangeText.
Keep keyboard movement and deletion, including execCommand deletion, on
complete surrogate-pair boundaries while exposing UTF-16 offsets.

Source: 3be5eb5e37
2026-09-15 15:35:38 +08:00
ldm0 1d132be5b3 Mark profile import as beta 2026-09-15 15:11:52 +08:00
ldm0 3f50eeb166 perf(fonts): reuse native Brotli for WOFF2 decoding 2026-09-15 15:11:52 +08:00
ldm0 8c8169bedd fix(fonts): update wuff to handle corrupt WOFF2 data
Upgrade wuff to 0.2.9 with compatible version requirements in the layout
and renderer test dependencies. Add a regression proving that corrupt
Brotli data returns a decode error and preserves an existing font.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17574 passed, 13 skipped
- Release verification: the previous SIGABRT sample renders with fallback;
  valid-font screenshots remain byte-identical
2026-09-15 15:11:52 +08:00
ldm0 ef8693519c build(linux): enable safe identical code folding
Enable LLD's safe ICF for x86_64 Linux GNU builds to fold duplicate native
functions while preserving observable function address identity.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17573 passed, 13 skipped
- Release smoke checks for JS, Wasm, Intl, workers, WebCrypto, compression,
  font rendering, and SQLite WAL / LevelDB profile imports
2026-09-15 15:11:52 +08:00
ldm0 4e3f174ab1 refactor(profile): simplify imports with a read-only LevelDB parser
Read Chrome localStorage snapshots through moli-leveldb-parser with
zerocopy layouts. Keep the LevelDB engine in test dependencies and port
Chromium reader scenarios with reproducible native fixtures.

Share WAL-aware SQLite snapshots and merge localStorage by origin and
UTF-16 key. Read all sources and required destination files before
replacing cookie or localStorage data.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (17573 passed, 13 skipped)
2026-09-15 15:11:52 +08:00
ldm0 53ec9ba9d6 build(sqlite): trim unused bundled extensions 2026-09-15 15:11:52 +08:00