Commit Graph
868 Commits
Author SHA1 Message Date
ldm0 60f7512a4e docs: remove screencast interval from readmes 2026-09-16 16:16:27 +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
SpringCorel 48db95c18e refactor(v8): share microtask execution boundaries 2026-09-16 14:59:42 +08:00
ldm0 053d3f604d refactor(v8): centralize JavaScript execution boundaries
Own callback microtask nesting in with_webidl_callback_contexts so operation
lookup, invocation, and return conversion share one boundary. Exit the
incumbent scope before Scoped-policy checkpoints and preserve Auto timing.

Route scripts, functions, modules, and constructors through named renderer
entry points, including worker execution. Keep the generic scope helper
private and remove manual callback wrappers from callers.

Cover microtask policies, exception cleanup, and incumbent cleanup ordering
with regression tests. Guard script and module execution entry points with
the existing source inventory checks.

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
ldm0 e6b08a4e30 fix(dom): create wrappers in their receiver realm
Cached child-document wrappers reapplied their current owner's native prototype,
overwriting JavaScript changes and changing prototypes during adoption. Return
cached wrappers directly and remove the custom-element exceptions and the
owner-document prototype correction from wrapper creation.

Create child Document wrappers in their owning context, deferring creation for
unmaterialized initial empty frames. Choose the receiver's creation context at
DOM return boundaries, including splitText, shadow and template access, forms,
Range and XPath results, and named Window access. Collection indexing and named
access use the collection's context. Keep traversal results and NodeFilter
arguments in the node document's realm as required by NodeWrapInOwnContext.
Wrapper creation uses the selected context's intrinsic interface prototype
without reading author-visible constructors or repairing prototypes later.

Cover changed and null prototypes, adoption, child Document and Range realms,
borrowed DOM methods, property interceptors, collections, replaced public
constructors, and isolated-world wrapper identity. Exercise first access before
other APIs can hide an incorrect creation realm by populating the wrapper cache.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (17,776 passed, 13 skipped)
2026-09-16 14:59:42 +08:00
ldm0 f6b833d288 fix(custom-elements): preserve constructor-selected prototypes
Remove constructor-name-based prototype repair after creation and upgrade.
Keep the prototype set by JavaScript, including null and changes made before
an upgrade fails, and synchronize that actual value across bridge wrappers.
Cached wrappers must retain it during construction and after failure; new
fallback wrappers still receive their owner-realm native prototype.

Add regression coverage for constructor-selected prototypes in the main
document and iframes, plus failed creation's original and fallback objects.
2026-09-16 14:59:42 +08:00
ldm0 9035ba2f5d fix(custom-elements): preserve prototypes on failures before super
Only finalize failed upgrade wrappers if the construction stack shows that HTMLElement construction consumed the pending wrapper. Throwing or returning a different object before super must leave the original prototype intact.

Add main-window and iframe regressions for both failure paths, including discarded attribute and connected reactions.
2026-09-16 14:59:42 +08:00
ldm0 1b214ad088 fix(custom-elements): checkpoint only outside active JavaScript
Expose native MicrotasksScope bindings and use them explicitly at Moli script, module, callback, constructor, and popup execution boundaries. Keep rusty_v8 call APIs unchanged.

Checkpoint custom element constructors before validation only when no outer script or microtask is active. Cover parser, document.write, createElement, and host-owned popup execution; update the document.write reaction-order regression.
2026-09-16 14:59:42 +08:00
SpringCorel c6de50242a fix(nextest): make root_client_metrics_track_window_surface_profile work on all platforms 2026-09-16 14:59:42 +08:00
SpringCorel d58d26e8fb fix(v8): fix undefined image url 2026-09-16 14:59:42 +08:00
SpringCorel 0d6cee5dde feat(cdp): add --cdp-screencast-fps option 2026-09-16 14:59:42 +08:00
SpringCorel 8b9c53d467 fix(v8): fix custom elements reaction pipeline 2026-09-16 14:59:42 +08:00
ldm0 2a3aa78f8d fix(fetch): inherit Headers methods and observe initializer iterators
Use the intrinsic Headers prototype for internally created header objects. Remove own method copies and platform-object initializer shortcuts so author iterator overrides, exceptions and record properties remain observable.

Source: 66434f2877, c229deb38c
2026-09-16 14:43:14 +08:00
ldm0 31fbadca9b fix(selection): respect document and modal inert boundaries
Source: 1354930065, eb2174ed49, f7b96d7940
2026-09-16 14:37:59 +08:00
ldm0 fea71c0f3d refactor(wpt): isolate script load fixture discovery helper
Keep the script load/error discovery helper and its hook separate from the XHR response fixture additions so both independent branches can merge without overlapping insertions.
2026-09-16 14:30:40 +08:00
ldm0 3028654817 fix(wpt): serve script load and error fixtures
Serve the script load/error endpoint as JavaScript with its requested 200 or 404 response and first query value. Recognize exact relative and absolute fixture references for classic and module script discovery.

Source: fdc7857483
2026-09-16 14:30:40 +08:00
ldm0 10a78042fe fix(cssom): append computed custom properties 2026-09-16 13:31:16 +08:00
ldm0 f684e465bc fix(selection): suppress trailing newline whitespace 2026-09-16 05:45:10 +08:00
ldm0 6e505565f2 test(wpt): refresh full cross-run baseline 2026-09-16 05:45:10 +08:00
ldm0 e3ae7c3bd1 fix(wpt): serve script charset fixtures as original bytes
Serve the upstream script Content-Type endpoint with original file bytes and the requested MIME value, including HEAD and empty MIME. Resolve exact relative handler references during case selection.

Source: 9e40fe628e
2026-09-16 02:43:23 +08:00
ldm0 01f5ee6e46 fix(dialog): apply modal UA styles and top-layer state
Source: 639cb1916b, f57c3dd731, cac97d8b9a
2026-09-16 01:54:38 +08:00
ldm0 3cdd95f6d5 fix(selection): preserve collapsed inline whitespace
Source: 2953b56b17
2026-09-15 20:44:01 +08:00
ldm0 312b0ffc6b feat(emulation): support worker user agent overrides v1.1.6 2026-09-15 16:54:51 +08:00
ldm0 e5217a4de1 fix(markdown): preserve whitespace between inline nodes 2026-09-15 16:31:50 +08:00
ldm0 357dda18e7 fix(editing): enforce maxlength with UTF-16 text offsets
Apply maxlength to user text insertion, preserve complete surrogate pairs,
and keep selection and replacement offsets in UTF-16 units. Cover CDP
input, execCommand insertText, and setRangeText.
Keep keyboard movement and deletion, including execCommand deletion, on
complete surrogate-pair boundaries while exposing UTF-16 offsets.

Source: 3be5eb5e37
2026-09-15 15:35:38 +08:00
ldm0 1d132be5b3 Mark profile import as beta 2026-09-15 15:11:52 +08:00
ldm0 3f50eeb166 perf(fonts): reuse native Brotli for WOFF2 decoding 2026-09-15 15:11:52 +08:00
ldm0 8c8169bedd fix(fonts): update wuff to handle corrupt WOFF2 data
Upgrade wuff to 0.2.9 with compatible version requirements in the layout
and renderer test dependencies. Add a regression proving that corrupt
Brotli data returns a decode error and preserves an existing font.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17574 passed, 13 skipped
- Release verification: the previous SIGABRT sample renders with fallback;
  valid-font screenshots remain byte-identical
2026-09-15 15:11:52 +08:00
ldm0 ef8693519c build(linux): enable safe identical code folding
Enable LLD's safe ICF for x86_64 Linux GNU builds to fold duplicate native
functions while preserving observable function address identity.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17573 passed, 13 skipped
- Release smoke checks for JS, Wasm, Intl, workers, WebCrypto, compression,
  font rendering, and SQLite WAL / LevelDB profile imports
2026-09-15 15:11:52 +08:00
ldm0 4e3f174ab1 refactor(profile): simplify imports with a read-only LevelDB parser
Read Chrome localStorage snapshots through moli-leveldb-parser with
zerocopy layouts. Keep the LevelDB engine in test dependencies and port
Chromium reader scenarios with reproducible native fixtures.

Share WAL-aware SQLite snapshots and merge localStorage by origin and
UTF-16 key. Read all sources and required destination files before
replacing cookie or localStorage data.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (17573 passed, 13 skipped)
2026-09-15 15:11:52 +08:00
ldm0 53ec9ba9d6 build(sqlite): trim unused bundled extensions 2026-09-15 15:11:52 +08:00
SpringCorel f81730fb1c fix(profile): gate macOS keychain imports 2026-09-15 15:11:52 +08:00
SpringCorel e454458be7 feat(profile): support profile import from chrome/firefox/curl 2026-09-15 15:11:52 +08:00
ldm0 bdf76173fe fix(layout): clamp negative widths in intrinsic inline probes 2026-09-15 14:58:25 +08:00
ldm0 4d110bd787 fix(emulation): report unsupported worker user agent overrides 2026-09-15 14:46:31 +08:00
ldm0 450c8f559b fix(cdp-smoke): validate CPU throttling capability errors 2026-09-15 14:46:31 +08:00
ldm0 8dfd1015b0 fix(emulation): reject unsupported device metrics modes 2026-09-15 14:46:31 +08:00
ldm0 17e961433e feat(emulation): apply native view scaling and capture viewport 2026-09-15 14:46:31 +08:00
ldm0 284667a01a feat(emulation): apply native screen geometry and resolution 2026-09-15 14:46:31 +08:00
ldm0 f6b2e4a0ef feat(emulation): support native automation overrides 2026-09-15 14:46:31 +08:00
ldm0 6c0e1a64dc feat(emulation): override native Data Saver queries 2026-09-15 14:46:31 +08:00
ldm0 0013b7925c feat(emulation): override native hardware concurrency 2026-09-15 14:46:31 +08:00
ldm0 46d5abcae3 feat(emulation): support default background color overrides 2026-09-15 14:46:31 +08:00
ldm0 af95ed7dcc test(emulation): await media query change delivery 2026-09-15 14:46:31 +08:00
ldm0 4a0a8304a7 feat(emulation): support reduced transparency preferences 2026-09-15 14:46:31 +08:00
ldm0 78e1a390c7 fix(emulation): deliver surface events on rendering turns 2026-09-15 14:46:31 +08:00