Commit Graph
4880 Commits
Author SHA1 Message Date
ldm0 1cfccd72cf feat(images): decode bounded ICO resources
Admit ICO in the shared image capability table and decode real PNG and BMP directory frames. Keep PNG frames on the existing bounded color-managed codec, with an explicit orientation policy so embedded Exif does not rotate ICO frames. BMP frames retain palette and AND-mask decoding.

Cover real pixels, directory selection, precision, malformed entries and metadata-only probing. Retain unsupported-format rejection using TIFF now that ICO is supported.
2026-11-22 02:02:03 +08:00
ldm0 efe44e00e7 fix(cdp): adapt navigation to optional runtime owner slots
Use the updated optional owner slot API when preparing beforeunload and completing navigation. Include the operation and case in ancestor-navigation realm assertion diagnostics.
2026-11-22 02:02:03 +08:00
ldm0 595ea3aa3b fix(runtime): integrate typed API state and Window ownership with main
Reconcile API dictionary snapshots and data properties with main, and migrate frontend listener state to the shared native EventTarget machinery. Preserve native proxy dispatch identity and validate callbacks in their captured execution context.

Use the shared cross-origin Window and Location infrastructure while retaining callee-realm errors, entry and incumbent navigation settings, lazy child contexts and document-order named access. Update regression fixtures for native task ownership and published geometry; retain all matrix assertions and compare video frame pixels directly without stringifying them.
2026-11-22 02:02:03 +08:00
ldm0 a254186841 fix(fetch): preserve browser transport semantics across main updates
Adapt shared request bodies, redirect handling and per-transfer response progress to the updated fetch APIs. Keep decoding correct with the new curl build, including encoded-byte accounting, cache timing and dictionary readability.

Vendor curl-sys at the existing curl-rust revision to retain tested browser TLS EOF handling without downgrading main. Keep native body teardown test consumers with the updated helper and isolate the full compressed timing matrix by scenario.
2026-11-22 02:02:03 +08:00
ldm0 d612c9d988 fix(navigation): preserve Blob MIME and committed child state 2026-11-22 02:02:03 +08:00
ldm0 013e0f6186 fix(navigation): resolve response MIME before document commit
Classify a bounded response prefix before replacing the active Document. Replay original chunks exactly once through the shared raw-document pipeline, retaining raw headers separately from computed MIME. Apply the same decision to streaming, captured and complete child responses.

Keep the old owner running while MIME is undecided. Cancel provisional navigation on stopLoading, propagate transport errors and route unsupported content to downloads before reporting navigation success. Allocate streaming-response navigation state lazily.

Add 13 native regressions for split signatures, replay and observer ownership, cancellation, old-document liveness, inert text, computed metadata and binary text downloads. Make the existing NUL literal-text fixture explicitly nosniff, preserving its assertions, and separately cover browser-confirmed binary download behavior.

Validation: fmt; all-target/all-feature workspace clippy; 22634 nextest passes with 32 threads and zero retries; original WPT 245/251 retained plus 3/3 added coverage. Pinned Chromium controls verify 12 MIME cases and 38 commit phases, 32 navigation cases, 36 frame metadata cases and 5 binary text/nosniff cases. No new original-WPT passes are claimed. Response-stage MIME overrides, image document.open DOM and Blob child-origin gaps remain follow-up work.
2026-11-22 02:02:03 +08:00
ldm0 eb2a184182 fix(documents): carry native MIME through frame snapshots
Publish native Document content types in page state and live, cached and detached child frame snapshots. Use this metadata for both CDP frame trees instead of raw headers or a hardcoded HTML type, without invoking author getters or creating child realms. Preserve raw response headers and HTML defaults for old serialized snapshots.

Expand native capture coverage for forged getters and disagreeing raw headers. Chromium controls verify document.open, lazy frames, cross-origin and sandbox metadata.

Validation: fmt; all-target/all-feature workspace clippy; 22621 nextest passes; original WPT 245/251 retained; frame metadata 33/36 (+13) and 12/12 (+11). Unknown main-response MIME sniffing remains follow-up work.
2026-11-22 02:02:03 +08:00
ldm0 f78a392579 fix(images): decode raster data served with XML MIME
Use the native raster probe to determine image usability even when MIME computation preserves a supplied XML type. Keep SVG decoder selection and existing response security and origin-clean checks.

Extend descriptor regressions across MIME, nosniff, HTTP status, origin-clean and invalid-data cases. Both original Fetch nosniff XML-MIME image tests now pass, with no new failures.

Validation: fmt; all-target/all-feature workspace clippy; 22621 nextest passes; original WPT 245/251 (+2); Chromium HTTP/Canvas/security matrix 18/18.
2026-11-22 02:02:03 +08:00
ldm0 fb4a6537c3 fix(documents): keep untyped nosniff navigations as text
Resolve missing or invalid navigation MIME with nosniff as text/plain before parsing, while preserving supplied MIME and image-subresource sniffing. Share the policy across streaming main documents and child navigation responses, Document network events and both main-frame tree paths.

Use only HTTP tab or space when recognizing the nosniff token, retaining VT and FF as significant bytes. This fixes three original classic-script WPT failures and avoids misclassifying navigation responses. Chromium comparisons fix eleven navigation scenarios, retaining all previous passes.

Validation: cargo fmt --all; all-target/all-feature workspace clippy; 22621 nextest passes, 16 existing skips; original WPT 243/251 (+3) with no new failures.
2026-11-22 02:02:03 +08:00
ldm0 b5378b9c0b fix(documents): stream native image navigation responses
Keep declared image response bytes out of HTML decoding and bind the browser-created host to its exact native image request. Complete the response through Document-owned post-parse work after DOMContentLoaded, retaining early navigation replies, source mutations, CSP checks and replacement cancellation.

Validation: fmt, all-target/all-feature clippy, 22617 nextest passes; original popup image WPT now passes, all 22615 prior native passes retained.
2026-11-22 02:02:03 +08:00
ldm0 a1ed53169c fix(documents): initialize child image documents from navigation bytes
Keep finite navigation text and image bodies as distinct sources. Build an
inert browser-owned image host and bind the accepted navigation bytes into the
existing image identity, decode and load lifecycle, avoiding a second request.
Keep later src mutations and author-created same-URL images subject to CSP.

Resolve absent HTTP MIME metadata through the shared byte sniffer instead of
the URL extension. Preserve explicitly supplied metadata, XML/SVG parsing and
native Blob image navigation. Cover source inertness, real image resources,
policy boundaries and the missing-MIME regression.
2026-11-22 02:02:03 +08:00
ldm0 0bcec98154 fix(images): respect decode request ownership and microtask ordering
Reject decode for failed current image requests even while another element
is fetching the same key. Preserve in-flight reuse while the requesting
element is selecting its source, then observe its own bound request.

Keep mutation/load callbacks behind the invocation microtask. Cover CSP,
source insertion, cached and in-flight picture reuse, and independently
successful or failed same-URL requests with native regression matrices.
2026-11-22 02:02:03 +08:00
ldm0 a94daefd06 fix(images): target picture mutations by the affected element
Keep img insertion local, update every picture image for source tree changes,
and restrict source attribute mutations to following images. Include source
width/height in relevant mutations. Share the pending-request retention path
for attribute and tree changes to avoid duplicate fetches and decode rejection.

Validation: fmt; workspace all-target/all-feature clippy with -D warnings;
22603 native tests pass at 32 threads with zero retries; 37 picture HTTP
contracts pass. The unmodified image WPT cohort improves 119 to 120/122:
two fixed cases and one newly failing stale source-removal expectation. The
current HTML removal steps and Chromium both update all sibling images;
the old WPT failure remains visible in the validation report.
2026-11-22 02:02:03 +08:00
ldm0 83957ee57b fix(images): retain referrer policies through request dispatch
Compare HTML image referrerpolicy states through the shared attribute planner.
Capture element and owner Document policies for network and Service Worker
requests, preserving that snapshot through interception and authentication.
Replay redirect referrer state before auth retries so stripped data stays lost.

Validation: fmt; workspace all-target/all-feature clippy with -D warnings;
22598 native tests pass at 32 threads with zero retries. Original image
mutation WPT improves 107/122 to 119/122; 39 strict HTTP/CDP/SW contracts
match Chromium, retaining the original image and HTTP hint regressions.
2026-11-22 02:02:03 +08:00
ldm0 fbb4e5ad73 feat(images): decode BMP through the shared raster contract
Admit BMP metadata and pixels using the existing bounded image decoder.
Preserve row orientation and padding, palette pixels, and malformed-input
rejection; support image loads and Canvas/ImageBitmap pixel consumers.

Validation: fmt, workspace all-target/all-feature clippy with -D warnings;
22595 native tests pass at 32 threads with zero retries; nine BMP pixel
contracts match Chromium; image/network regression cohorts retained.
2026-11-22 02:02:03 +08:00
ldm0 5c78d01da6 fix(images): update requests for same-value attribute assignments
Run the shared image mutation plan for successful attribute assignments
even when the stored value is unchanged. Cover reflected properties,
UTF-16 setters, namespace setters, Attr mutations, and NamedNodeMap.

Keep a current in-flight request when the selected image identity is
unchanged, preserving decode promises and avoiding duplicate fetches.
Leave unrelated attributes and equivalent CORS states without image work.
2026-11-22 02:02:03 +08:00
ldm0 522bff2100 fix(images): synchronize completion with admitted image requests
Reuse accepted image data synchronously while keeping load delivery on
the native DOM task source. Derive completion from the active request
instead of an old resource slot.

Decode only the element's admitted resource and reject an already failed
request without waiting for error dispatch. Preserve request ownership,
Promise realms, and loaded resources after document base URL changes.
2026-11-22 02:02:03 +08:00
ldm0 8fca1cdf60 fix(images): load valid images from HTTP error responses
Use MIME and image bytes to determine decode eligibility instead of
requiring an HTTP 2xx status. Keep upstream request security checks and
origin cleanliness unchanged.

Cover valid raster and SVG bodies at error statuses and rejection of
empty or malformed image data through the shared parkable image path.
2026-11-22 02:02:03 +08:00
ldm0 b1dabae0d8 feat(fetch): honor subresource response Link preloads
Apply no-referrer to hints from final subresource responses and route them through their loading Document's resource authority. Reuse the native preload pipeline for network and Service Worker responses, deduplicate recursive hints, and reject retired owners before entering V8.

Preserve streaming bytes, cancellation and source security checks; exclude main-resource navigation and Worker-internal responses. Respect nosniff before ORB body sniffing.
2026-11-22 02:02:03 +08:00
ldm0 fcdb5dc6e4 feat(fetch): preload stylesheets from Document response headers 2026-11-22 02:02:03 +08:00
ldm0 8767291144 fix(fetch): tolerate empty Link header parameters 2026-11-22 02:02:03 +08:00
ldm0 4c06c3847e feat(modules): preload modules from Document response Link headers 2026-11-22 02:02:03 +08:00
ldm0 dd10902cf0 feat(fetch): preload scripts from Document response Link headers
Parse response hints once and load script preloads through the owning
Document resource authority, including CSP, interception, Service Workers,
integrity, cancellation and Resource Timing. Preserve script URL fragments
and prevent Service Worker producers from consuming their own preload.

Validation: cargo fmt, workspace clippy with all targets and features,
and all 22548 nextest tests passed with 32 threads and zero retries.
Original WPT nonce coverage now passes both cases; the existing header
modulepreload timeout remains a separate Modulator follow-up.

Share native Document timing retention with stylesheet completions that
precede the main world, and flush it when the main Window execution context
is registered.
2026-11-22 02:02:03 +08:00
ldm0 4147ca373e fix(fetch): load document dictionary hints in the owning storage partition 2026-11-22 02:02:03 +08:00
ldm0 683be1ffab feat(fetch): support partitioned compression dictionaries 2026-11-22 02:02:03 +08:00
ldm0 c8dff7fb18 fix(fetch): match encoding cache variants against actual request headers 2026-11-22 02:02:03 +08:00
ldm0 729006643f feat(fetch): enable native Zstandard response decoding 2026-11-22 02:02:03 +08:00
ldm0 2b4235c6c3 fix(performance): preserve encoded response sizes across cache reuse 2026-11-22 02:02:03 +08:00
ldm0 e2bd2b0932 fix(fetch): ignore URL fragments in the raw memory cache 2026-11-22 02:02:03 +08:00
ldm0 fd9ebc742a fix(fetch): preserve body receipt across native decoding failures 2026-11-22 02:02:03 +08:00
ldm0 cd96e44aec fix(performance): retain resource timing across Window request failures 2026-11-22 02:02:03 +08:00
ldm0 5ca9cdbad9 fix(dom): preserve iframe insertion order in Window and Document lookups 2026-11-22 02:02:03 +08:00
ldm0 61a777c0e3 fix(dom): destroy child navigables without unload events 2026-11-22 02:02:03 +08:00
ldm0 de7e97a6bd fix(fetch): honor cache-only requests and stale constraints 2026-11-22 02:02:03 +08:00
ldm0 92f2fe17be fix(fetch): match cached responses using Vary 2026-11-22 02:02:02 +08:00
ldm0 46562eeadf fix(fetch): revalidate browser memory cache responses 2026-11-22 02:02:02 +08:00
ldm0 389928f77d fix(performance): expose native resource timing response metadata
Add the remaining response metadata and router getters with native JSON snapshots. Preserve request, interim and final header observations through Window and Worker fetch lifecycles, and filter iframe encoding metadata before discarding redirect provenance.

Validation: cargo fmt --all; strict workspace/all-target/all-feature Clippy; 22470 nextest PASS with 16 existing skips; 2114 retained original WPT PASS; 24/24 interim-response tests and 28/28 native metadata contract checks. Original WPT gained 106 PASS without losing existing PASS.
2026-11-22 02:02:02 +08:00
ldm0 175d45d1c1 fix(worker): publish fetch and XHR resource timing
Own Worker resource timing independently of CDP records and retain native response boundaries across streaming, failure, and cancellation. Keep completed byte counts and abort status when JavaScript delays transport delivery.

Share native streaming IO between synchronous and asynchronous XHR, retire the previous Worker request on open(), and use the saved Worker origin throughout CORS, ORB, and response construction.

Validation: cargo fmt; strict workspace all-targets all-features Clippy; 22463 nextest passes; 86 Worker integration checks; original HTTP/HTTPS Worker timing WPT timeouts become passes with no retained PASS losses.
2026-11-22 02:02:02 +08:00
ldm0 b88f4e15ec fix(worker): reuse native cache for imported scripts 2026-11-22 02:02:02 +08:00
ldm0 250f398a46 fix(worker): publish imported script resource timing
Retain fetch outcomes separately from script validation and publish native resource entries before executing imports or propagating loader errors. Preserve requested URLs and filter response information through the worker origin and TAO policy.

Share resource timing buffer operations across page and worker registries, deliver worker overflow through the native networking queue, and expose PerformanceResourceTiming in workers. Cover import outcomes, buffering, trusted events and close-time cleanup.
2026-11-22 02:02:02 +08:00
ldm0 e1164686c3 fix(encoding): validate decoder stream chunks with Web IDL 2026-11-22 02:02:02 +08:00
ldm0 b784cc7995 fix(encoding): expose branded text stream prototype attributes 2026-11-22 02:02:02 +08:00
ldm0 35936545e1 fix(encoding): snapshot decoder input after options conversion 2026-11-22 02:02:02 +08:00
ldm0 7b70f21bcd fix(encoding): preserve decoder and BOM state after stream errors
Preserve codec state across streaming errors, serialize BOM state only for successful output, and reset both at non-stream boundaries. Cover ISO-2022-JP recovery and Unicode BOM handling in native, Window, and Worker tests.
2026-11-22 02:02:02 +08:00
ldm0 869082c897 fix(encoding): preserve legacy decoder state across empty chunks 2026-11-22 02:02:02 +08:00
ldm0 728b32c7c8 fix(encoding): preserve UTF-16 boundaries in encoder streams 2026-11-22 02:02:02 +08:00
ldm0 db316be5f2 fix(encoding): use standard label parsing for text decoders
Pass labels directly to the shared encoding_rs parser in TextDecoder and
TextDecoderStream so Unicode whitespace cannot hide invalid labels. Keep
the existing derived argument conversion order.

Add a shared 512-case native/browser regression covering valid ASCII
whitespace, invalid label characters, aliases, replacement rejection and
conversion semantics. Original Encoding WPT gains 10,656 passing checks
with no passing-test losses.
2026-11-22 02:02:02 +08:00
ldm0 c4b96a012d fix(url): create query objects with intrinsic bindings 2026-11-22 02:02:02 +08:00
ldm0 380cadd025 fix(dom): preserve recursive Range subfragments and tree order 2026-11-22 02:02:02 +08:00
ldm0 96683795ea fix(dom): preserve partial Range content processing order 2026-11-22 02:02:02 +08:00