Commit Graph
65 Commits
Author SHA1 Message Date
ldm0 e99ebf05c9 fix(performance): bind legacy timing to native state 2026-11-20 22:47:43 +08:00
ldm0 ca5162732a fix(observers): align notifications with document rendering
Run ResizeObserver after animation callbacks using depth-limited broadcasts
and freshly published layout, then apply focus fixup and sample intersections.
Deliver IntersectionObserver callbacks in a separate exact-Document task.

Preserve constructor order and active observer lifetime in the native registry;
validate Document and realm ownership across callbacks and bound reentrant work.
Sample padding, logical axes, inline boxes and device-pixel zoom from frozen
layout, including iframe geometry, and wake rendering after CSSOM changes.

Validation: fmt and workspace Clippy passed; Nextest 20,240 passed, 16 skipped.
Selected ResizeObserver WPT: 7 pages / 46 subtests passed. 153 original WPT pages
have no new failures; focus and navigation probes passed 31 and 152 cases.
2026-11-20 22:47:43 +08:00
ldm0 942909f368 fix(focus): process autofocus candidates from child documents
Join child candidates to their active top-level Document's queue in connection
order. Revalidate ownership and ancestor fragments when flushing, and preserve
blocked candidates until their own Document's stylesheet readiness settles.

Construct focus transitions in the target Document's realm using the intrinsic
FocusEvent with its view, without consulting author constructors or inherited
initialization getters. Cover queue ownership, retirement, policies, stylesheet
wakes, and cross-realm focus event behavior.
2026-11-20 22:47:43 +08:00
ldm0 fcb399ec2f fix(window): honor scroll receiver and WebIDL argument semantics
Capture and authorize the Window receiver before converting scroll arguments,
then apply the operation only to that Window's surviving execution context.
Keep popup offsets on their canonical Window instead of the creator global.

Use derived ScrollToOptions and unrestricted-double converters, including
overload selection, conversion order, exception propagation and non-finite
normalization. Return successful Promises in the receiver realm and use the
shared Promise binding adapter for receiver and conversion rejections.

Cover borrowed methods, native/forged/proxy receivers, argument reentrancy and
receiver removal. The upstream window-scroll-arguments WPT improves from 6/12
to 12/12; the 104-case comparison has no lost passing cases or subtests.
2026-11-20 22:47:42 +08:00
ldm0 210c64e5a5 fix(fonts): validate FontFace descriptors with shared CSS parsing 2026-11-20 22:47:41 +08:00
ldm0 38d45c91c1 fix(popup): dispatch native lifecycle events with Document targets
Construct popup load events through the intrinsic Event constructor and apply the legacy Document target override to load and pageshow. Keep dispatch paths and listener receivers on the popup Window.

Cover native interfaces, trust, cancellation, cleanup, redispatch, constructor overrides, retirement during load, and failed initial navigation without a materialized Document.
2026-11-20 22:47:41 +08:00
ldm0 301b2eefab feat(dom): implement Observable subscription lifecycle 2026-11-20 22:47:39 +08:00
ldm0 5b02e5f668 fix(fetch): honor byte ranges in blob URL responses
Resolve single ranges against captured Blob bytes for Window and Worker Fetch
and XHR, including partial response headers and integrity verification. Reject
malformed or unsatisfiable ranges and normalize author headers before CORS
preflight and context overrides so repeated ranges cannot lose earlier values
or skip preflight.

Cover byte boundaries, cloned and revoked URL entries, empty and binary bodies,
request guards, synchronous XHR, and partial-body integrity. Add the two passing
Blob range WPT cases to the verified catalogue.
2026-11-20 22:47:39 +08:00
ldm0 ab91079a70 fix(input): implement native clipboard shortcuts for text controls
Dispatch trusted clipboard events for native copy, cut, and paste shortcuts,
then apply text-control edits through cancelable, typed InputEvents. Resolve
focus and selection after event listeners and preserve UTF-16 selections,
readonly and password behavior, maxlength, and single-line normalization.

Keep paste data read-only and retire clipboard DataTransfer objects after
dispatch. Use intrinsic event constructors even when page scripts replace
the globals.

Add seven regression tests for editing, cancellation, focus changes, and
clipboard data lifetime. Validate 38 native CDP scenarios against Chromium
and 63 WPT cases; textEditCommands.html now passes with no regressions in
the remaining cases.
2026-11-20 22:47:37 +08:00
ldm0 4985f524b4 feat(close-watcher): implement programmatic lifecycle
Expose the Window-only CloseWatcher interface through native derive bindings.
Implement requestClose(), close(), destroy(), ordered event handlers and
AbortSignal algorithms, including reentrant calls and inactive documents.
Retain the creation realm separately from the reusable WindowProxy so old
watchers cannot become active after navigation.

Add five native regressions covering lifecycle, dictionary conversion,
signal ordering, interface brands, intrinsic events and detached child realms.
Native Escape requests and activation grouping remain follow-up work.

Validation: cargo fmt --all; full workspace/all-target/all-feature Clippy
with warnings denied; cargo nextest run --no-fail-fast (18288 passed,
13 skipped). Selected browser WPTs improve from 0/30 to 25/30; the remaining
failures require native Escape handling or pass through click hit testing.
The cross-document navigation probe matches Chromium.
2026-11-20 22:47:37 +08:00
ldm0 26a5ba90dc fix(fetch): cancel pre-aborted uploads synchronously
Preserve the selected request body stream in Window and Worker fetch
bindings. Reject with the original abort reason before synchronously
canceling a readable upload, and handle the internal cancellation promise
without replacing the fetch rejection or reading public Promise methods.

Merge RequestInit bodies and inherited methods before validating the
effective request. Nullish body overrides inherit the input body; invalid
stream options and GET/HEAD bodies fail construction before cancellation.
Remove the obsolete public then shim and its classified direct-call entry.

Add regression coverage for cancellation timing, reason identity, source
errors, body selection, reentry, validation and modified public intrinsics
in Window, iframe and Worker contexts.

Validation: fmt and strict workspace Clippy passed; nextest passed 17,962
tests with 13 skipped. All 12 pre-abort and 3 ordinary-upload CLI probe
groups passed. The 83-case WPT selection gains two passing subtests with
no regressions or new failures; whole-case counts remain 77 pass / 6 fail.
2026-11-20 22:47:37 +08:00
ldm0 76131f0d6b fix: validate RequestInit consistently before fetch abort 2026-11-20 22:47:36 +08:00
ldm0 24234efbb0 fix(canvas): settle ImageBitmap promises through bitmap tasks
Reject Web IDL conversion errors through the returned Promise and decode
raster Blobs from their bytes on the blocking pool. Deliver results through
a dedicated bitmap task source bound to the exact Page and Window realm.

Retain canvas, ImageData and ImageBitmap pixel snapshots for crop, resize,
flip and alpha processing. Clear pixels on close and reject closed sources
in drawImage. Read HTML canvas dimensions from native attributes.

Cover Promise timing, pixels, intrinsic prototypes, child realm retirement,
document.open and real navigation identity collisions with Page task tests.
2026-11-20 22:47:36 +08:00
ldm0 eb97f86f01 fix(trusted-types): align WebIDL interfaces and global accessors 2026-11-20 22:47:36 +08:00
ldm0 09602ad7d0 fix(scripts): enforce client-origin CORS before script execution
Bind script loads and cache entries to the document client origin, authorize redirects before following them, and preserve redirect origin taint across Window and Worker Fetch/XHR validation and response filtering.

Check dynamic script CSP before transport, cover real HTTP and lifecycle regressions, and refresh the one newly passing WPT case after fixed-binary CLI/CDP comparisons.
2026-11-20 22:47:35 +08:00
ldm0 2838583c09 fix(url): align hierarchical and opaque path encoding
Encode carets in hierarchical paths and encode only the final opaque-path space before query or fragment delimiters. Preserve the encoded path across suffix mutations and remove the obsolete parser trimming and V8 query-removal workaround.

Add five shared-parser and three VM regressions covering constructors, setters, URLSearchParams, DOM links, and cross-realm behavior. Synchronize 11 stale vendored WPT expected records with pinned current WPT data; inputs, the WPT driver, and the remaining expected-failure entry are unchanged.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17632 passed, 13 skipped). Vendored all-features unit tests, WPT driver, and 67 doctests pass.

On the same 50 URL/Location WPT cases, CLI and CDP both improve from 42 to 48 passing cases and from 7036 to 7085 passing subtests (+49), with no new failures. The two remaining failures are the existing webkitURL alias and srcdoc scrolling cases. Move the verified non-file anchor case to passed.

CDP smoke: 42/43 groups pass. Puppeteer cannot run because node is absent, reproduced with the before binary.

Artifacts: target/wpt-url-encoding-20260908-AP6CI1. WPT revision: db95fafd1fcef8428805e41eb5705d444e8c67ce. Release SHA256: f132f0afe7f49d627ed9b5d397b1d5b71d80432180b08b1d076aa67637efdd65.
2026-11-20 22:47:35 +08:00
ldm0 3da2ff3120 fix(events): retarget sources across composed dispatch 2026-11-20 22:47:34 +08:00
ldm0 ba2a8e22be fix(html): align command interface semantics 2026-11-20 22:47:34 +08:00
ldm0 2b895fc0da fix(dom): bind DOMParser to its relevant document 2026-11-20 22:47:34 +08:00
ldm0 e4c278a612 fix(events): implement beforeunload return semantics 2026-11-20 22:47:33 +08:00
ldm0 190f7762b1 fix(svg): align matrix factories with DOMMatrix 2026-11-20 22:47:33 +08:00
ldm0 16f9ddc40e fix(geometry): expose legacy window aliases 2026-11-20 22:47:33 +08:00
ldm0 1700a019a7 fix(geometry): propagate NaN through DOMRect bounds 2026-11-20 22:47:33 +08:00
ldm0 12ed65d9d7 fix(geometry): construct DOMRectReadOnly instances 2026-11-20 22:47:33 +08:00
ldm0 0abfa1b92d fix(indexeddb): validate schema key paths and exception ordering
Extracted from wpt-misc-fix commit ed78778f5d.
2026-11-20 19:15:13 +08:00
ldm0 df885c8d6a fix(canvas): store typed fill and stroke colors
Sync main and use a single Stylo color value for Canvas style serialization and drawing.
2026-11-20 12:36:44 +08:00
ldm0 06692c6549 fix(canvas): support Path2D rendering and WebGL bindings 2026-11-20 12:01:49 +08:00
ldm0 43af9e02c4 refactor(webapi): share native events and WebIDL options 2026-11-20 02:31:09 +08:00
ldm0 4544fc3942 refactor(webapi): initialize Response factories natively 2026-11-20 02:31:09 +08:00
ldm0 710f6194b6 refactor(webapi): share PushSubscription and service worker options 2026-11-20 02:31:09 +08:00
ldm0 3536fc8f6a refactor(webapi): share IndexedDB argument conversion 2026-11-20 02:31:09 +08:00
ldm0 a1847fce17 refactor(webapi): share SVGMatrix bindings 2026-11-20 02:31:09 +08:00
ldm0 d1ccee7e06 feat(events): expose the native PageSwapEvent interface
Extracted from wpt-misc-fix commit 012dde71182bd56ac049cfbc759817406f63bdfb.
2026-11-20 01:39:46 +08:00
ldm0 d3c548fe02 refactor(webapi): share native event and response value construction 2026-11-20 00:11:14 +08:00
ldm0 fcdec1dba7 refactor(webapi): share renderer-independent bindings and conversions
Move event initialization, WebAssembly bindings, Fetch values, interface constants and WebIDL conversions into moli-webapi. Reuse existing native owners for dispatch, resources and realm installation.
2026-11-20 00:11:14 +08:00
ldm0 e4f3dfb402 refactor(webapi): share SVG and renderer value factories 2026-11-19 21:30:58 +08:00
ldm0 833c6af457 refactor(webapi): share CSSOM and DOM value factories 2026-11-19 21:30:58 +08:00
ldm0 14274ee14a build: update Rust toolchain to 1.100.0
Use matching Bookworm images for CI and release builds. Address the compiler deprecations and Clippy diagnostics introduced by Rust 1.100.0.
2026-11-19 05:56:01 +08:00
ldm0 6b8baf41e0 refactor(webapi): check declared interface receivers by default 2026-11-18 20:40:51 +08:00
ldm0 bfc5e71355 refactor(webapi): share Blob File and FormData bindings 2026-11-18 20:16:52 +08:00
ldm0 7818b14864 refactor(webapi): move Streams bindings into moli-webapi 2026-11-18 20:16:52 +08:00
ldm0 ecf7800c06 refactor(webapi): share navigation storage and WebSocket values 2026-11-18 20:16:52 +08:00
ldm0 aaf0f0f34b fix(webrtc): expose native sender RTP capabilities
Extracted from ab9bae47ce on wpt-misc-fix.
2026-11-18 14:19:16 +08:00
ldm0 6555a38617 feat(events): implement the native PageRevealEvent constructor
Extract an independent, cohesive change from wpt-misc-fix.

Source-commit: 4ed92703687079f322bfb3b06bac41fa2588e508
2026-11-18 05:26:46 +08:00
ldm0 c9e3c9cf6d refactor(webapi): share pointing keyboard and touch event construction 2026-11-17 20:02:51 +08:00
ldm0 8dacd7680c refactor(webapi): share UI event construction and modifier state 2026-11-17 20:02:51 +08:00
ldm0 e2322b114b refactor(touch): share native TouchEvent construction and conversion
Extract an independent, cohesive change from wpt-misc-fix.

Source-commit: 69e523e6ce
2026-11-17 19:15:20 +08:00
ldm0 eb7cbc095e refactor(webapi): extract constructor values and document host boundaries 2026-11-17 17:14:28 +08:00
ldm0 f7ba5690c2 refactor(webapi): give text codecs independent runtime ownership 2026-11-17 17:14:28 +08:00
ldm0 2e32db6721 refactor(webapi): share base events and WebSocket value constructors 2026-11-17 17:14:28 +08:00