Commit Graph
912 Commits
Author SHA1 Message Date
ldm0 577aef69e0 fix(timers): retain the initiating script nonce
Snapshot the initiating script nonce when scheduling string timeouts and intervals, then restore it on the compiled timer source. Cover dynamic imports, nested timers, identical source scheduled under different nonces, and functions invoked by another script.
2026-09-18 00:34:11 +08:00
ldm0 f082f8a95b fix(wpt): serve XHR request header fixtures
Serve raw XHR header inspection and echo endpoints with exact name/value filters, original ordering and duplicate fields. Reuse arbitrary-method routing and return early without reading unused uploads; cover CORS metadata, HEAD and discovery boundaries.
2026-09-17 20:39:27 +08:00
ldm0 005751612c fix(wpt): serve JSON module lifecycle fixtures
Serve JSON module load/error dependencies and the per-key JSON-to-JavaScript response sequence. Keep counters shared across fixture origins and isolated between servers, with exact resource discovery and HEAD behavior.
2026-09-17 20:38:34 +08:00
ldm0 bffa334608 fix(csp): match WebSocket sources against HTTP schemes
Allow ws sources to match http and https, and wss sources to match https.
Distinguish WebSocket-to-HTTP compatibility from exact scheme matching and
secure upgrades so same-security ports remain constrained and self does not
mistake distinct origins for the same origin.

Cover scheme sources and exact/wildcard hosts with wildcard ports in both
Window and Worker checks, plus numeric ports, host/path restrictions and
asymmetric scheme transitions.
2026-09-17 17:09:30 +08:00
ldm0 e2c0683c36 fix(csp): validate host sources and decode path segments
Parse CSP host-source syntax before matching, retaining raw host and path
components instead of normalizing them through the URL parser. Match paths
by percent-decoding individual segments for exact and wildcard sources.

Cover invalid tokens, encoded delimiters, distinct non-UTF-8 bytes, dot
segments, redirect restrictions, ports and hostname boundaries. Preserve
existing support for ordinary IPv4 sources.

(cherry picked from commit 889babcac9)
2026-09-17 17:09:30 +08:00
ldm0 96ee6e182d fix(csp): match wildcard ports on exact hosts
Source: bd80b3a832
2026-09-17 17:09:30 +08:00
ldm0 c7b9b52557 fix(csp): parse each policy in response header lists
Split response CSP and report-only fields into independent policies in wire order. Preserve policy disposition and CSP whitespace behavior, and enforce every policy in a field. Preserve source token whitespace after directive splitting so invalid vertical tabs cannot become wildcard permissions.

Source: dcb55392f5, 889babcac9
2026-09-17 17:04:25 +08:00
ldm0 9cd3789f23 perf(layout): reject out-of-viewport caret queries 2026-09-17 14:53:54 +08:00
ldm0 61669e8740 perf(layout): reject point misses before shared clip checks 2026-09-17 14:53:54 +08:00
ldm0 29b5a36d5f perf(layout): stream point hit candidates before ordering results 2026-09-17 14:53:54 +08:00
ldm0 636d97e21c perf(layout): keep hit results free of unused box models 2026-09-17 14:53:54 +08:00
ldm0 43dd80a890 perf(layout): answer specialized geometry queries once 2026-09-17 14:53:54 +08:00
ldm0 7d562fad12 fix(cookies): isolate partitioned cookie quotas
Exclude partitioned cookies from the unpartitioned global quota and scope
per-domain counting and eviction to the complete partition key. Loading a
Chrome profile with CHIPS cookies now preserves ordinary login cookies
such as V2EX A2.

Add regression coverage for independent global and partition quotas,
partition-local eviction, and replacement at the limit.

Validation: cargo fmt --all and workspace/all-targets/all-features clippy
with -D warnings passed. The three new regressions passed, and a real
Chrome profile retained A2 unchanged and restored the V2EX login.
The full nextest run was stopped at the user's request; an unrelated
non-UTF-8 SQLite filename test failed on this macOS filesystem before
cancellation.
2026-09-17 14:19:03 +08:00
ldm0 c49d1b72ba fix(events): preserve detached Window receiver identity
Use the native Window brand to recognize child globals across method realms. Distinguish valid detached child Windows from invalid receivers when adding or removing event listeners; detachment has already cleared their event state.

Cover retained child references, borrowed EventTarget methods, invalid receivers, and parent listener isolation. Restore the verified iframe promise-rejection WPT to the passed list.
2026-09-17 14:17:33 +08:00
ldm0 f645752894 fix(parser): notify mutations when coalescing text
Return text mutation effects from parser sinks and deliver them through the shared notification pipeline after releasing the structural borrow. This keeps stylesheets and layout current when parser input is merged into existing text nodes, and delivers characterData records without replacing node identity.

Add main-document and iframe regressions for split stylesheet input, hit testing, and MutationObserver delivery. Restore the verified elementsFromPoint iframe WPT to the passed list.
2026-09-17 14:17:33 +08:00
ldm0 d56bbd7c28 fix(webidl): validate MessageChannel getter receivers
Enable the shared native receiver check for MessageChannel accessors. Cover genuine cross-realm receivers, forged and author Proxy receivers, callee-realm exceptions, and dedicated/shared workers.

Source: 9559bb123b
2026-09-17 03:39:08 +08:00
ldm0 91ce06dfd0 fix(csp): enforce worker module import policies
Source: 3727623bf2
2026-09-17 03:35:33 +08:00
ldm0 306e090e97 test(modulepreload): select the pending owner notification task
Source: d4c773ba93
2026-09-17 03:00:11 +08:00
ldm0 9ece52011c test(wpt): refresh full cross-engine case results
Record the full 12,905-case run at 4f7c4ffc0: 8,766 passed, 3,792 failed, 285 timed out, 53 stalled, and 9 errors. Preserve the measured full-run classifications, including the two independently confirmed stable regressions.
2026-09-17 02:59:17 +08:00
ldm0 3913375f4b fix(wpt): serve the XHR CORS echo fixture
Serve the upstream CORS echo endpoint for standard and custom methods, including original query/body metadata, repeated allow-headers fields, delay errors, HEAD, and exact resource discovery.

Source: 9b27c82fb5
2026-09-17 02:59:00 +08:00
ldm0 3d664bf3b5 fix(markdown): expand presentational tables into blocks
Honor presentation and none table roles with ASCII case-insensitive matching and HTML whitespace trimming. Preserve captions, cell content, and independent conversion of nested data tables.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (18,162 passed, 13 skipped).
v1.1.7
2026-09-17 02:19:47 +08:00
ldm0 5b7d151a78 fix(layout): avoid eager geometry for hit-test misses 2026-09-17 02:16:44 +08:00
ldm0 5897e0f94b test(stylesheet): select the pending dynamic link event
Source: 8b78dc4157
2026-09-17 02:14:17 +08:00
ldm0 94a7eaf864 fix(style): honor table cell dimension presentation hints 2026-09-17 01:30:53 +08:00
ldm0 a14ec9788c refactor(markdown): unify output ownership and table state
Use concrete Output and Cow parameters with conversions at call sites. Merge text fragments and keep table cell lifecycle and complexity checks inside Table.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (18,114 passed, 13 skipped).
2026-09-17 01:16:06 +08:00
ldm0 0e521aa8a3 feat(markdown): render simple HTML tables as GFM
Synthesize empty headings for simple headerless tables and keep complex tables readable as blocks. Use owned output fragments to avoid repeated copying through nested fallback tables.

Cover escaping, alignment, layouts, CLI output and linear copy growth. Validated with cargo fmt, workspace Clippy, and 18,114 passing nextest tests (13 skipped).
2026-09-17 01:16:06 +08:00
ldm0 cff5927983 fix(clipboard): share byte snapshots across page realms
Store validated clipboard representations in the BrowserContext instead of retaining page-owned V8 objects. Reconstruct fresh items and blobs on reads, commit all representations together, and recheck write permission after pending data settles. Cover child realms, document teardown, independent contexts, and rejected writes.

Source: 331945eaf9
2026-09-17 01:15:10 +08:00
ldm0 4f7c4ffc0b 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-17 01:11:29 +08:00
ldm0 f92c9bda50 fix(webidl): validate DOM receivers with native brands
Enable shared receiver checks for Document structure, CharacterData, Text,
ProcessingInstruction and affected HTML element templates. Keep registered
native Proxies valid EventTargets while rejecting author-created Proxies.

Preserve windowless node identity and UTF-16 data when routing CharacterData
through native handles, including Text/CDATA wholeText, live ranges and XPath
iterator invalidation. Validate raw reflected/event handler receivers before
conversion or mutation, with the LegacyLenientThis mouse event exceptions.

Cover cross-realm error constructors, forged and proxy receivers, conversion
ordering, native Proxy event dispatch and detached CharacterData mutation.
2026-09-17 01:00:47 +08:00
ldm0 59ed855b9d fix(webidl): enforce integer ranges after truncation
Apply integer truncation before range validation and constrain 64-bit EnforceRange to JavaScript exact integers. Cover negative fractions, finite endpoints, non-finite values, and OPFS offset range rejection.

Source: 1a1ca5af42
2026-09-17 00:39:47 +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