Commit Graph
4881 Commits
Author SHA1 Message Date
ldm0 405df965e7 test(cdp): adapt captured navigation bodies to Base64 2026-11-21 20:03:35 +08:00
ldm0 1022b4fcf9 fix(media): derive capability configuration snapshots 2026-11-21 20:03:35 +08:00
ldm0 25931fed59 fix(css): preserve supports query token semantics 2026-11-21 20:03:35 +08:00
ldm0 ad6fdb4d90 fix(cssom): serialize computed background layers
Serialize computed background from the shared retained style read, using the image list to coordinate layers, repeating or truncating other component lists, and emitting color only in the final layer. Include computed initial components instead of using specified-value shorthand elision.

When Stylo cannot serialize a computed shorthand, reify the shared CSSOM result as one property-associated opaque CSSStyleValue. Preserve native realm allocation, snapshot immutability and longhand Typed OM types. Cover multiple layers, currentcolor, list coordination, private native writes and cross-realm reads.
2026-11-21 20:03:35 +08:00
ldm0 e1e0934fc9 fix(images): truncate fractional raster natural dimensions
Project density-corrected raster natural dimensions to integer CSS pixels by truncating rather than rounding. A decoded 1x1 image at 1.5x or 2x density must expose zero natural dimensions; at 0.4x it must expose two.

Keep SVG concrete-size rounding, floating-point intrinsic sizes and the image load/decode lifecycle intact. Centralize the integer projection at the resource store, where decoded image metadata distinguishes raster and SVG. Cover four explicit densities with real intercepted GIF responses.
2026-11-21 20:03:35 +08:00
ldm0 783518661c fix(images): parse source sizes with shared CSS primitives
Replace comma/string splitting with CSS component parsing and shared Stylo length math and media conditions. Resolve sizes against the owning document viewport, initial font metrics and emulated media features. Validate computed math before property clamping and retain fractional CSS pixels.

Canonicalize zero source sizes, including negative zero, to positive infinite density so request keys cannot abort the renderer. Keep existing auto sizing behavior while requiring an exact leading CSS auto identifier. Cover CSS boundaries, media conditions, non-finite math, request reuse and successful decode without layout.
2026-11-21 20:03:35 +08:00
ldm0 928050ff6c refactor(webrtc): derive session description snapshots
Use one typed RTCSessionDescriptionInit schema for constructor conversion, native factories, private backing and fresh JSON results. Reuse the RTCSdpType enum and retain UTF-16 SDP, lexical input conversion and the existing type/sdp output order.

Resolve registered native Proxy receivers through shared identity before reading the private snapshot. Keep returned dictionaries independent and emit fixed local-description payloads through the data_properties declaration.
2026-11-21 20:03:35 +08:00
ldm0 c3ad68d409 fix(images): honor picture source MIME type hints
Skip unknown and unsupported source MIME hints before selecting a picture candidate. Use the shared WHATWG MIME parser and actual image codec capabilities, retaining empty hints and null-namespace attribute semantics.

Cover fallback, same-request preservation, type changes, real icon resources, and activation after adoption from an inactive Document. The unchanged source-selection WPT cohort improves from 83/103 to 103/103, matching Chromium.
2026-11-21 20:03:35 +08:00
ldm0 9e62f38e04 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-21 20:03:35 +08:00
ldm0 5777b1e92f 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-21 20:03:35 +08:00
ldm0 86baa01e61 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-21 20:03:35 +08:00
ldm0 30342f4b40 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-21 20:03:35 +08:00
ldm0 cb173c0f58 fix(navigation): preserve Blob MIME and committed child state 2026-11-21 20:03:35 +08:00
ldm0 0cdb045b94 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-21 20:03:35 +08:00
ldm0 186afe3994 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-21 20:03:35 +08:00
ldm0 799f3aa3a7 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-21 20:03:35 +08:00
ldm0 4d0d091e14 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-21 20:03:34 +08:00
ldm0 95016c8aa8 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-21 20:03:34 +08:00
ldm0 78b2753b21 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-21 20:03:34 +08:00
ldm0 4f3b68a08f 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-21 20:03:34 +08:00
ldm0 9a642e313f 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-21 20:03:34 +08:00
ldm0 5a537ee8bd 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-21 20:03:34 +08:00
ldm0 629d333b94 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-21 20:03:34 +08:00
ldm0 29b0774bdb 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-21 20:03:34 +08:00
ldm0 a2e570aa52 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-21 20:03:34 +08:00
ldm0 3cd7c06e7f 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-21 20:03:34 +08:00
ldm0 a5111fb08e 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-21 20:03:34 +08:00
ldm0 46d095504e feat(fetch): preload stylesheets from Document response headers 2026-11-21 20:03:34 +08:00
ldm0 42b8d88360 fix(fetch): tolerate empty Link header parameters 2026-11-21 20:03:34 +08:00
ldm0 68bc3ebd0c feat(modules): preload modules from Document response Link headers 2026-11-21 20:03:34 +08:00
ldm0 ea9bd55680 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-21 20:03:34 +08:00
ldm0 41f3c18199 fix(fetch): load document dictionary hints in the owning storage partition 2026-11-21 20:03:34 +08:00
ldm0 48ed57dca6 feat(fetch): support partitioned compression dictionaries 2026-11-21 20:03:34 +08:00
ldm0 16f8e44f82 fix(fetch): match encoding cache variants against actual request headers 2026-11-21 20:03:34 +08:00
ldm0 43d741a2b8 feat(fetch): enable native Zstandard response decoding 2026-11-21 20:03:34 +08:00
ldm0 12186b8695 fix(performance): preserve encoded response sizes across cache reuse 2026-11-21 20:03:34 +08:00
ldm0 68bd608d0a fix(fetch): ignore URL fragments in the raw memory cache 2026-11-21 20:03:34 +08:00
ldm0 65d6e57a6f fix(fetch): preserve body receipt across native decoding failures 2026-11-21 20:03:34 +08:00
ldm0 b36446ce71 fix(performance): retain resource timing across Window request failures 2026-11-21 20:03:34 +08:00
ldm0 a2a68297a0 fix(dom): preserve iframe insertion order in Window and Document lookups 2026-11-21 20:03:34 +08:00
ldm0 e4e0158b78 fix(dom): destroy child navigables without unload events 2026-11-21 20:03:34 +08:00
ldm0 a45f2eca34 fix(fetch): honor cache-only requests and stale constraints 2026-11-21 20:03:34 +08:00
ldm0 6d2764f076 fix(fetch): match cached responses using Vary 2026-11-21 20:03:34 +08:00
ldm0 509cb4e840 fix(fetch): revalidate browser memory cache responses 2026-11-21 20:03:34 +08:00
ldm0 44f1e64b0d 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-21 20:03:34 +08:00
ldm0 9ac3ec38a5 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-21 20:03:34 +08:00
ldm0 c86b90c1a4 fix(worker): reuse native cache for imported scripts 2026-11-21 20:03:34 +08:00
ldm0 81cd773f4f 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-21 20:03:34 +08:00
ldm0 4691f23775 fix(encoding): validate decoder stream chunks with Web IDL 2026-11-21 20:03:34 +08:00
ldm0 fedeac65a4 fix(encoding): expose branded text stream prototype attributes 2026-11-21 20:03:34 +08:00