Commit Graph
1346 Commits
Author SHA1 Message Date
ldm0 225030f30e fix(indexeddb): convert iterable key paths only once 2026-09-30 00:53:12 +08:00
ldm0 d92d4da858 test(wpt): refresh cases after MIME fixes
Run the full 13,631-case profile on source 112a97e61 with Moli and Chromium
145.0.7632.116 at parallelism 50, using WPT db95fafd1fcef8428805e41eb5705d444e8c67ce.
The case set and fixed scheduling order match the previous full run.

Moli: 9,540 pass, 3,704 fail, 263 timeout, 61 error, 10 crash, 53 harness-stalled.
Chromium: 11,388 pass, 1,897 fail, 242 timeout, 16 error, 18 crash, 70 harness-stalled.
All three JSON module regressions pass on both engines. Relative to 7d9a0a98c,
11 cases gain pass and five lose pass, for a net increase of six.

Keep raw full-run outcomes. Four pass losses pass once on both frozen binaries
in focused diagnostics; SharedWorker-extendedLifetime fails identically in
all three focused runs on each binary, including the pre-fix build.

Validate complete per-engine execution, exact raw/matrix agreement, and sorted,
disjoint, exhaustive status lists. No missing cases or recovery placeholders.
2026-09-29 23:17:46 +08:00
ldm0 ce2edbb9e1 fix(mime): unify JSON/font types and response header extraction
Accept text/json for JSON modules and use one is_json_mime classifier across
modules, documents, JSONPath, and resource inspection. Remove the module and
document aliases and recognize the seven registered application font types.

Use Fetch MIME extraction over the complete Content-Type header list for
script/style checks, workers, WebAssembly, ORB, and JSONPath. Derive classic
script charsets from the same MIME record, including charset inheritance and
resets when the MIME essence changes, while preserving BOM and fallback order.

Cover valid and invalid MIME types, header ordering, combined fields, quoted
commas, nosniff, and charset selection with regression tests.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 19,005 passed, 16 skipped
- Focused WPT: Moli passes 9 cases / 261 subtests, including the three JSON
  regressions and all 31 script Content-Type extraction checks.
2026-09-29 23:17:46 +08:00
ldm0 9d78cb34af test(wpt): refresh full cases on current head
Run the unfiltered all profile against WPT db95fafd1f with Moli built
from 7f9b8b63d (dev, debug=0) and Chromium 145.0.7632.116, using 50 CDP
workers. Both engines execute all 13,631 cases without setup errors,
missing results, or unexecuted recovery placeholders.

Moli: 9,534 pass, 3,708 fail, 264 timeout, 63 error, 52 harness-stalled,
and 10 crash. Chromium: 11,383 pass, 1,899 fail, 242 timeout, 17 error,
72 harness-stalled, and 18 crash.

Compared with the previous lists, 171 cases gain pass and 11 lose pass,
for a net gain of 160. Of the previous refresh's 104 pass losses, 101
now pass, two fail, and one errors. Retain the original full-run
outcomes; separate diagnostic reruns do not replace list statuses.

Validate all eight lists against the raw results and matrix: sorted,
disjoint, exhaustive, and complete. git diff --check passes.
2026-09-29 23:17:46 +08:00
ldm0 7f9b8b63d7 test(wpt): refresh full cases after navigation preload fix
Run unfiltered profile all on WPT db95fafd1fcef8428805e41eb5705d444e8c67ce
with Moli built from 8ba39c4aa1 and Chromium 145.0.7632.116, 50 workers.
Both engines produced results for all 13,631 cases.

Moli: 9,374 pass, 3,686 fail, 260 timeout, 247 error, 54 harness-stalled,
10 crash. Chromium: 11,334 pass, 1,888 fail, 272 timeout, 30 error,
89 harness-stalled, 18 crash.

Complete 91 previously unexecuted cases after a worker exhausted its
restart budget, using the same binary and fixture in bounded batches.
Use their first measured outcomes (63 pass, 26 fail, 2 timeout); preserve
all actual full-run failures and crashes. Both samesite-iframe and
empty-preload-response-body now pass in both engines.

Validate all eight status lists against the raw results and matrix:
sorted, disjoint, exhaustive, with no missing or unexecuted cases.
Compared with the previous refresh, 65 cases gain pass and 104 lose pass
(98 probe errors, 6 failures). Before/after diagnostic rechecks recover
31 of those 104 on the fixed binary; the other 73 also fail or error on
the old binary. Diagnostic retries do not replace full-run outcomes.
2026-09-29 19:03:23 +08:00
ldm0 f6ef80e399 fix(service-worker): allow navigation preload during activation
Recognize the activating version while the runtime keeps it in the waiting
slot until activate settles. NavigationPreloadManager can now enable,
disable, read state and set its header during initial activation, and the
state is persisted when activation completes.

Cover the inactive/activating boundary and persistence in a runtime test,
plus a real iframe navigation served through event.preloadResponse.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(18,933 passed, 16 skipped). The four selected navigation-preload WPT cases
improve from 1 pass / 1 fail / 2 timeout to 3 pass / 1 fail; both the same-site
iframe and empty preload body cases now pass.
2026-09-29 19:03:23 +08:00
ldm0 ac9b83d21e chore(wpt): refresh full cases with consolidated fixtures
Run the unfiltered all profile on Moli c429911cdf and Chromium
145.0.7632.116 using WPT db95fafd1f and 50 CDP workers. Moli was
built from this branch with cargo build --locked (dev, debug=0).

Both engines completed all 13,631 cases without setup errors or
recovery-aborted cases. Keep the existing 13,558 cases and add 73.
Moli: 9,413 pass, 3,687 fail, 264 timeout, 202 error, 55
harness-stalled, and 10 crash. Chromium: 11,380 pass, 1,899 fail,
243 timeout, 19 error, 72 harness-stalled, and 18 crash.

Verify all eight lists are sorted, disjoint, complete and exactly
match the Moli matrix. Preserve the raw statuses, including 200
five-second CDP evaluate probe timeouts. The previous snapshot
used Moli d40181f729; this refresh is not a controlled fixture A/B.
2026-09-29 19:03:23 +08:00
ldm0 5e80001318 refactor(wpt): unify fixture dispatch and preserve raw response headers
Reconcile the shared HTTP handlers and discovery rules from the split PRs with the complete fixture surface in wpt-misc-fix. Share stash namespaces and XHR dispatch, retain the existing testdriver bridge, preserve raw header values, and carry forward the remaining pipe, template, and dynamic-import regressions.

Validation: 742 Python tests across 74 modules pass; focused Ruff checks and git diff --check pass. With fixed Moli and Chromium binaries, a 27-case WPT comparison against main improves whole-case passes from 7 to 26 and 6 to 23 respectively, with no previously passing case regressing.
2026-09-29 19:03:23 +08:00
ldm0 4473d42935 fix(wpt): serve MIME-controlled nosniff scripts
Carry the remaining HTTP fixture and its regression tests from wpt-misc-fix at 3cd3c8968b.
2026-09-29 19:03:23 +08:00
ldm0 a9dc675b0a fix(wpt): serve form echo bodies as hexadecimal bytes
Carry the remaining HTTP fixture and its regression tests from wpt-misc-fix at 3cd3c8968b.
2026-09-29 19:03:23 +08:00
ldm0 446ac04b9b fix(wpt): serve worker URL encoding fixtures
Carry the remaining HTTP fixture and its regression tests from wpt-misc-fix at 3cd3c8968b.
2026-09-29 19:03:23 +08:00
ldm0 cccefdc7d9 fix(wpt): inspect Fetch request headers across HTTP methods
Bring the remaining Fetch header fixtures from wpt-misc-fix, including early responses to unread uploads, CORS metadata, response status pipes, and handler discovery. Consolidates d210a13a5d and 8e2764e6cd with their current regression tests.
2026-09-29 19:03:23 +08:00
ldm0 bde57e580c fix(wpt): serve the preload request counter fixture
Implement preload/resources/preload-count.py and admit its exact references
during case discovery. Resource requests increment a shared counter and fail
with 404; result requests return JavaScript and consume the count. This lets
the unsupported-type WPT verify that no preload request was sent.

Validation: 432 Python WPT tests across 31 modules, run with 32 workers.
Moli and Chromium both pass the affected WPT and the two related MIME cases
(47 subtests per engine). Only Python and the WPT pass ledger changed.

(cherry picked from commit b8a3d0497d3575200ce28896c8bcde7f8c4719c4)
2026-09-29 19:03:23 +08:00
ldm0 a4604a1939 fix(wpt): model Fetch redirect fixtures
Serve Fetch redirect.py with upstream Origin and credentials responses,
preflight handling, query inheritance, counters, delays and form status codes.
Recognize its relative, absolute and RESOURCES_DIR references during discovery.

Cover the HTTP behavior and discovery with regressions. Verify the fixture
against upstream wptserve, including byte parsing and unread request bodies.

(cherry picked from commit 813bb1b3ecb4e55c5a0167df22494ca5269b1ef1)
2026-09-29 19:03:23 +08:00
ldm0 7ec4a3ac15 fix(wpt): serve XHR request URI and redirect fixtures
Implement requri.py and redirect.py with their upstream query, status,
Location, delay, and method behavior. Preserve raw request URIs and allow
redirect responses before the upload completes.

Recognize supported XHR references during case selection and cover the
fixtures through real HTTP requests.

Validation: all 510 benchmark unit tests pass. With the unchanged Moli
binary, 17 WPT cases improve from 6 to 9 passes and 72 to 79 passing
subtests; both redirected Worker harnesses now execute their assertions.

(cherry picked from commit 456c59b63e4ef997d35dbf984b2406a6c3c75926)
2026-09-29 19:03:23 +08:00
ldm0 53c7e7073f fix(wpt): serve iframe parentage stash results
Support the iframe parentage stash fixture with write-once POST and read-once retrieval, preserving UUID/path namespaces and the difference between an absent value and empty bytes. Reuse the Python-handler response path for pipe processing. Tests cover requests, methods, body framing and case selection.

Validation: all branch checks passed. Ran 333 tests in 135.692s; OK
(cherry picked from commit 39dc2130dc)
2026-09-29 19:03:23 +08:00
ldm0 ef25ac681f fix(wpt): serve charset inheritance handler responses
Serve the bogus HTTP charset fixtures with their original bytes and optional valid meta charset. Match upstream response behavior for HEAD, extension methods and response-pipe bypass. Include exact reference selection and byte-level response tests.

Validation: all branch checks passed. Ran 325 tests in 122.514s; OK
(cherry picked from commit 9827403ad3)
2026-09-29 19:03:23 +08:00
ldm0 721f043bf1 fix(wpt): serve raw Content-Type response fixtures
Serve the WPT content-type fixture as its original raw HTTP response, preserving duplicate, empty and malformed Content-Type fields and response bytes. Support standard and extension methods without consuming irrelevant uploads. Tests cover wire output, HEAD, pipelines and exact case selection.

Validation: all branch checks passed. Ran 329 tests in 129.466s; OK
(cherry picked from commit 252861d9c8)
2026-09-29 19:03:23 +08:00
ldm0 dd4111042d fix(wpt): validate form submission fixture bodies
Serve the form-submission body checker for GET, HEAD and POST. Preserve its exact URL-encoded and plain-text checks and MIME-aware multipart field parsing, including duplicate fields, file parts and transfer-encoding boundaries.

(cherry picked from commit 83c8955175)
2026-09-29 19:03:23 +08:00
ldm0 28a861f8d4 fix(wpt): serve Fetch preflight state fixtures
Serve Fetch preflight and stash cleanup endpoints with method/header validation and shared request state. Preserve repeated query and origin values, exact resource namespaces and immediate responses for unused uploads.

(cherry picked from commit 807abbe05b)
2026-09-29 19:03:23 +08:00
ldm0 e5ac01642f fix(wpt): serve service worker import and update fixtures
Model service worker script redirects, versioned imports and update response sequences, including file-based and installation updates. Preserve request methods, cache metadata, raw script bytes and per-resource state shared across fixture origins.

(cherry picked from commit 5d0ddf013b)
2026-09-29 19:03:23 +08:00
ldm0 3ef21f694e fix(wpt): serve service worker registration error fixtures
Consolidate #621 with its fixture-resource initialization correction. Preserve remote-context handler selection from main.
2026-09-29 19:03:23 +08:00
ldm0 862bd53e87 fix(wpt): serve XHR response header fixtures
Model xhr/resources/headers.py with its duplicate, empty, cookie and non-ASCII response headers. Include HEAD behavior and precise fixture discovery regression coverage.

(cherry picked from commit 8557f41b0c)
2026-09-29 19:03:23 +08:00
ldm0 883f3f0c8d fix(wpt): serve XHR PUT and wildcard preflight fixtures
Consolidate #622, including its fixture-resource test correction, alongside the XHR network-error handlers.
2026-09-29 19:03:23 +08:00
ldm0 e11344f65c fix(wpt): model XHR network error fixtures
Serve malformed chunk framing and the upstream infinite redirect loop instead of Python source. Preserve raw partial body delivery, origin and query parameters, HEAD semantics, and exact fixture discovery.

Source: 0de7826105
(cherry picked from commit 0f4acf2725)
2026-09-29 19:03:23 +08:00
ldm0 967c9de888 fix(wpt): keep loopback host templates tied to the primary domain
Consolidate #552 and #938 on top of the IDNA and nested-domain support already in main. Preserve the requesting host for location templates and use web-platform.localhost in the cross-engine runner.
2026-09-29 19:03:23 +08:00
ldm0 e391d0924f fix(wpt): parse fixture response pipes like wptserve
Tokenize pipe commands with wptserve escape, argument, and repeated-query rules. Return HTTP errors for malformed pipes and preserve ordered header operations without response header injection.

Source: 232701464d
(cherry picked from commit 90258a7da8)
2026-09-29 19:03:23 +08:00
ldm0 fcfc477212 fix(cdp): normalize empty target creation URLs
Normalize an empty Target.createTarget URL to about:blank before constructing the renderer command so initial target metadata and navigation state agree. Regression coverage exercises default and browser-context target creation.

Validation: all branch checks passed. Summary [ 115.491s] 18922 tests run: 18922 passed (9 slow), 16 skipped
2026-09-29 18:25:21 +08:00
ldm0 10ccdc2064 fix(modules): share JSON and CSS response MIME validation 2026-09-29 18:11:53 +08:00
ldm0 fa6daec422 feat(webrtc): implement ICE and data channel event constructors
Expose RTCPeerConnectionIceEvent and RTCDataChannelEvent with native Event inheritance, dictionary conversion, branded payload validation and readonly attributes. Tests cover conversion order, exceptions, cross-realm values, subclassing, reinitialization and Window-only exposure.

Validation: all branch checks passed. Summary [ 104.941s] 18927 tests run: 18927 passed (9 slow), 16 skipped
2026-09-29 18:10:22 +08:00
ldm0 a7beb2e816 fix(html): reflect link and meta metadata attributes
Expose link.rev, link.type and meta.scheme through the existing native DOMString reflection infrastructure. Regression coverage includes live and windowless documents, owner-prototype descriptors, valid non-ASCII and astral Unicode, attribute mutations and receiver validation before value conversion.

Validation: all branch checks passed. Summary [ 191.579s] 18922 tests run: 18922 passed (3 slow), 16 skipped
2026-09-29 18:09:26 +08:00
ldm0 14cc9792ef fix(encoding): exclude HTML meta from XML encoding selection
Give document decoding explicit HTML, XML, and text declaration policies.
XML ignores HTML meta elements, retains BOM and transport charset precedence,
and selects an initial XML declaration or UTF-16 signature before its UTF-8
default. Keep partial declarations and signatures buffered across chunks.

Cover conflicting meta declarations with and without an XML declaration,
including main documents, iframes, and external raw input. Adapt seven
Chromium XML/XHTML navigation scenarios and three decoder boundary tests
from Chromium a03603fe9af6230a12f1b2fb2c18a7d003a0d937; source paths are
recorded next to the tests. These include KOI8-R script inheritance, CP1251
XML, BOM-less UTF-16, supplementary Unicode characters, and BOM boundaries.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- XML and Chromium regression tests passed.
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast:
  18,980 passed, 16 skipped.
2026-09-29 18:01:12 +08:00
ldm0 83a78cf6e3 fix(document): decode main XML responses before parsing
Keep network XML response bytes intact through the existing raw-body renderer
path. Decode both network and external XML bodies with the shared response
decoder, then install the selected encoding before document bootstrap.
Remove the obsolete ready-body capture variant used by the old XML path.

Cover matching main-document and iframe text, namespaces, and characterSet for
Atom, RSS, and text/*+xml responses with Windows-1252 headers, XML declarations,
and UTF-16LE/BE BOMs. Exercise the external input as single-byte chunks and
verify that BOMs override a conflicting transport charset.

Validation:
- Before the fix, the network regression returned caf� / UTF-8 instead of
  café / windows-1252.
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- Six focused XML tests passed.
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast:
  18,954 passed, 16 skipped.
2026-09-29 18:01:12 +08:00
ldm0 a3af75845d fix(document): preserve inherited encoding and XML MIME routing
Keep valid inherited text encodings ahead of heuristic detection while
preserving BOM, transport charset, and JSON default precedence. Share the
response decoder between streaming main documents, asynchronous child
loads, data URLs, and blocking child snapshots.

Classify navigation XML MIME types independently of DOMParser's allowlist,
including +xml subtypes in parser routing and text exclusions. Add
regressions for inherited UTF-8, literal encoding declarations, XML
namespaces, and DOMParser rejection of navigation-only XML types.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast
  18,952 passed, 16 skipped. Two existing timing tests failed under the
  default concurrency, then passed individually and in the full run above.
2026-09-29 18:01:12 +08:00
lanyue-llk 6f46f21142 fix(document): construct projection parser with the public API 2026-09-29 18:01:12 +08:00
lanyue-llk 345ba4cbc4 fix(document): share literal text parsing across child document paths 2026-09-29 18:01:12 +08:00
lanyue-llk 9d236a20ef fix(parser): preserve text document MIME and encoding semantics 2026-09-29 18:01:12 +08:00
ldm0 a9830ab24b fix(csp): reject nonnonceable script elements
Apply the shared script nonceability check to parser scripts, buffered preloads and runtime script preparation. Suspicious script attribute names and values must not authorize execution merely because a nonce matches. Includes parser, preload and dynamic-preparation regressions.

The attribute checks follow the [CSP3 nonceability algorithm](https://www.w3.org/TR/CSP3/#is-element-nonceable), including case-insensitive `<link`, `<script` and `<style` matches and parser duplicate attributes.

Validation: all branch checks passed. Summary [ 115.690s] 18925 tests run: 18925 passed (9 slow), 16 skipped
2026-09-29 16:27:50 +08:00
ldm0 b8fb80345e perf(fonts): skip pristine style materialization without sources
Avoid materializing a document style world during font reconciliation when no font state, style state or active author stylesheet exists. Keep document and connected shadow-root adopted sheets observable, and retain reconciliation after any state has been published. Tests cover the lazy path and shadow adopted-sheet sources.

Validation: all branch checks passed. Summary [ 104.769s] 18923 tests run: 18923 passed (9 slow), 16 skipped
2026-09-29 16:22:43 +08:00
ldm0 bec8387729 fix(popups): require a fragment for same-document navigation
Gate both popup same-document fast paths on GET, a non-null target fragment and non-reload navigation. Repeated fragmentless GET submissions now load a new document through the normal navigation path.

Exercise two GET and POST submissions for each popup target with no-store responses, checking actual requests and document replacement. Verified the GET regression fails before the fix.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (18945 passed, 16 skipped).
2026-09-29 15:23:17 +08:00
ldm0 d732fcd8c0 fix(forms): keep popup submissions in their browsing context
Share the native document browsing-context check with visibility getters. Route popup self, parent and top submissions through popup navigation, preserving POST requests and fetching again for same-URL POSTs.

Cover real GET/POST requests, borrowed submit methods, repeated POST, navigation cancellation and closed popup documents. Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (18945 passed, 16 skipped).
2026-09-29 15:23:17 +08:00
ldm0 c2972bb991 refactor(forms): share bindings across native and detached wrappers 2026-09-29 15:23:17 +08:00
ldm0 c12e9f8416 perf(forms): resolve named items from indexed candidates 2026-09-29 15:23:17 +08:00
ldm0 c3adec0054 fix(forms): preserve image sources in live named lists
Carry the selected control or image query into RadioNodeList descriptors
and reuse the same matching helpers when resolving live collections.
Retained image lists keep their filter when matching controls are added,
and retained control lists never switch to image fallback.

Cover image membership, descriptor access, name changes, tree order,
removal, and adoption while preserving form.elements control filtering.
2026-09-29 15:23:17 +08:00
ldm0 144a344e0f fix(forms): honor own properties in named access
Replace the native-member name allowlist with real own-property checks
using the incoming V8 name. Keep definition restrictions separate from
named-property visibility so Reflect.defineProperty returns false while
Object.defineProperty throws for supported names.

Cover own data and accessor properties across parsed, detached, adopted,
and child-document forms, including collisions with prototype members.
2026-09-29 15:23:17 +08:00
ldm0 da07e9723c fix(trusted-types): report eval violations in report-only mode
Apply Trusted Types conversion and violation reporting to report-only eval and Function sinks while allowing unconverted sources when enforcement is absent. Preserve default-policy exceptions and the existing rejection of transformed code-generation sources. Includes report-only execution and queued violation regressions.

Validation: all branch checks passed. Summary [ 132.995s] 18922 tests run: 18922 passed (9 slow), 16 skipped
2026-09-29 12:16:49 +08:00
ldm0 20746549c8 fix(wpt): expand IDNA and nested host templates
Expand WPT domain and host templates for configured Unicode labels, nested subdomains and alternate hosts using IDNA output. Leave unknown template keys and non-template response bytes unchanged. Tests exercise response bodies, headers and one-pass request substitutions.

Validation: all branch checks passed. Ran 324 tests in 125.691s; OK
2026-09-29 12:05:40 +08:00
ldm0 6108e3eda5 fix(wpt): support remote context executors and dispatcher queues
Support remote-context executor pages and dispatcher queues, including atomic FIFO messages, request-header forwarding, CORS and response pipes. The branch includes the minimal shared response/body helpers it needs and does not depend on the iframe-stash branch. Tests cover wire behavior, concurrent queue operations and case selection.

Validation: all branch checks passed. Ran 336 tests in 134.129s; OK
2026-09-29 11:23:31 +08:00
lanyue-llk 468729e7de fix(forms): preserve live and detached named property semantics 2026-09-29 07:54:26 +08:00
ldm0 3c7557ee2d feat(xpath): expose compiled expressions with context document evaluation
Expose XPathExpression and implement Document/XPathEvaluator.createExpression with a retained native XPath AST. Compilation resolves namespaces once; repeated evaluation reads the current context document, including detached and cross-realm documents.

Share context-document evaluation with Document.evaluate and invalidate detached-document iterators after native mutations. Regression coverage checks receiver/argument ordering, namespace resolution, document mutations, repeated evaluation, garbage collection, and isolate teardown.

Validation: fmt, strict workspace clippy, full nextest. Summary [ 104.560s] 18907 tests run: 18907 passed (9 slow), 16 skipped
2026-09-29 07:31:28 +08:00