Commit Graph
175 Commits
Author SHA1 Message Date
ldm0 f12f497bf1 feat(cdp): expose Moli version in discovery
Read the CLI package version at build time and publish it as Moli-Version in /json/version. Verify discovery and CLI version consistency.
2026-10-23 15:56:41 +08:00
ldm0 2356a63eff fix(css): use native font size adjustment shorthand semantics 2026-10-23 04:26:49 +08:00
ldm0 ce7f503f28 fix(fetch): match Chromium for bare-CR header EOF 2026-10-22 02:33:44 +08:00
ldm0 87527dec85 perf(deps): unify AWS-LC on the latest backend 2026-10-22 01:15:19 +08:00
ldm0 2f45fbf990 perf(deps): share the pinned IDNA implementation
Resolve cookie and URL IDNA consumers to the pinned rust-url revision,
removing the duplicate registry implementation. Cover Unicode cookie
domains, canonical URLs and host-only matching.

Validation on the unchanged final source tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast (20,505 passed, 18 existing skips).
2026-10-21 23:16:23 +08:00
ldm0 f660ee584f refactor(csp): extract shared policy engine into moli-csp 2026-10-21 22:15:00 +08:00
ldm0 510a5cbf3e fix(fetch): parse bare CR response fields like Chromium
Enable the curl fork's opt-in browser HTTP/1 response-field parser before
framing and callbacks. Cover CR-separated/folded fields, leading/repeated
CR, observations, length/chunked bodies and malformed framing across all
three fetch transports. Consume lexmount/curl-rust#3 at 79310cbd939.

Extracted from 3c1dfe9e8a8b69a72cb50ec53c57df7e249c5a67 onto main
8d57e02b3c, retaining its XML fork pin.

Validated cargo fmt --all, strict workspace/all-targets/all-features
Clippy and cargo nextest run --no-fail-fast: 20,490 passed, 18 skipped.
Live CDP checks of six raw-header responses match Chromium exactly in
status, response headers and body. The curl fork's 75 local tests pass.
2026-10-21 19:34:39 +08:00
ldm0 fa293e83e2 refactor(xml): consume lexmount fork instead of vendored parser
Consume lexmount/html5ever at 4574311c63e79bba7d4ddb98cb0562d8dad499ee and remove the XML vendor tree and obsolete ignore exceptions. All 11 production XML source files match the former vendor byte-for-byte; HTML, XML and Stylo still share registry markup5ever 0.40.0 and web_atoms 0.3.0.

Rebased the style stack onto origin/main at ebae4ca6ca.

Validation: Release; cargo fmt --all; strict workspace/all-target/all-feature Clippy; cargo nextest run --no-fail-fast (20413 passed, 18 skipped); 312 paired XML WPT executions and 840 Chromium overflow comparisons with no differences. Full WPT and nine status/subtest-change replays found no new stable regression.
2026-10-21 17:55:02 +08:00
ldm0 dc3fc902f0 fix(layout): preserve wrapped flex distribution across overflow modes
Adopt the separate Taffy distribution fallback correction. Remove the scroll-only branch, preserve flex-start versus safe center behavior in every writing mode, and add a browser regression that checks child positions for visible and scroll overflow.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20287 passed, 18 skipped). The combined working tree passed these checks before this logical split. Frozen Release and focused browser/WPT validation also passed; final full WPT is running.

Original-commit: 4d5786f1a1
2026-10-21 17:55:02 +08:00
ldm0 c00c9f8cd9 fix(layout): retain resolved grid widths and coherent wrapped flex flows
Adopt the separately validated Taffy fixes for vertical min-content float-grid parents and wrapped RTL flex scroll padding. Preserve the upstream intrinsic keyword result, share one physical flow projection, and cover both browser seams with CLI regression tests.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20286 passed, 18 skipped). The combined working tree passed these checks before this logical split. Frozen Release and focused browser/WPT validation also passed; final full WPT is running.

Original-commit: 6374fa6725
2026-10-21 17:55:02 +08:00
ldm0 9288430fa0 fix(layout): adopt fork flex and static-position corrections
Pin the tested Taffy fork with intrinsic flex constraints, supported baseline grouping, wrapped stretch measurement and scroll origin corrections. Reuse the existing shared static fallback and remove duplicate grid coordinate projection.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20284 passed, 18 skipped). The combined working tree passed these checks before this logical split. Frozen Release and focused browser/WPT validation also passed; final full WPT is running.

Original-commit: fe7aa2fe70
2026-10-21 17:55:02 +08:00
ldm0 a1965aa9ae fix(layout): adopt fork constraint fixes and isolated content probes
Pin published Taffy and Stylo fixes for baseline provenance, intrinsic child bounds, grid/OOF ratio constraints, writing modes, selector matching, stylesheet nesting and calc type dependencies. Treat IFC ContentProbe inputs as intrinsic contribution measurements.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20283 passed, 18 skipped). Release v3 and five browser regression rounds. Full WPT recorded separately.

Original-commit: b002c0e823
2026-10-21 17:55:02 +08:00
ldm0 6424f9e555 fix(layout): integrate ratio and orthogonal grid regression fixes
Original-commit: 81c9bd1abd
2026-10-21 17:55:02 +08:00
ldm0 e78f5a33b2 feat(layout): update Taffy and Stylo forks with current Blitz adapters
Move Taffy to 0.15 and Stylo to 0.22 using fixed fork revisions, with the
matching stylo_taffy adapter. Upgrade cssparser and the production HTML/XML
parsers while preserving the vendored XML behavior.

Adapt sizing inputs, baselines, grid positions, overflow and out-of-flow
ownership. Preserve font-stretch CSSOM compatibility and intrinsic sizing
through nested atomic inline probes.

Validation: root cargo fmt --all; strict workspace/all-target/all-feature
Clippy; Nextest 20280 passed, 18 skipped; Release build; five browser
regression rounds; RTL and nested intrinsic Chromium geometry controls.
Full WPT Cross is recorded separately with its Cases refresh.

Original-commit: 281a920d89
2026-10-21 17:55:02 +08:00
ldm0 f2f0028d80 chore(deps): update Taffy fork after compatible upstream rebase
Replay the 43 Moli patches onto upstream 2e4dbc55 while preserving the
0.13 interfaces consumed by Moli and stylo_taffy. Include the upstream
grid loop bounds, definiteness tracking and flex wrapping fixes.

Keep the intrinsic sizing regression fixes and repair the existing RTL
scrollbar inset and wrapped-column baseline failures. Pin the published
fork at 3c19aa124ebcef6320a4e84e141be19f4af659c3.

Validation: cargo fmt --all; strict workspace Clippy; full Nextest
(20279 passed, 18 skipped, NEXTEST_TEST_THREADS=16); Release build;
Taffy native tests (5898 passed, 4 ignored); full WPT Cross plus old/new
three-round retests of all 26 worsened case statuses.

Original-commit: d95b40495e
2026-10-21 17:55:02 +08:00
ldm0 4a655435bc fix(layout): include percentage padding in flex content sizing
Resolve percentage padding against the flex containing block while measuring a content flex basis. This keeps the text content width intact before line breaking. The browser regression covers three container widths, four padding percentages and both box-sizing modes.

MOL-467: Taffy 02c4920e93348e20cb197667a366e0a15e91db39. Browser before/after probes retained.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast: 20279 passed,18 skipped.

Original-commit: 8ab5696ccc
2026-10-21 17:55:02 +08:00
ldm0 ceda61205a fix(layout): apply inline-block intrinsic maximum widths
Constrain auto-width inline-blocks by max-width:min-content while preserving intrinsic minimums, minimum precedence and automatic growth. Pin the separate Taffy sizing fixes, including the block-root auto-fill control.

MOL-466: Taffy a34a7a82e5144b311b2fcb34feeb8412db9d0117. Browser before/after probes retained.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast: 20278 passed,18 skipped.

Original-commit: d4016168b2
2026-10-21 17:55:02 +08:00
ldm0 44fe2b6ddc fix(layout): honor intrinsic minima in grid tracks and rows
Pin the separate Taffy71617899 and4a618c7b fixes: resolve authored intrinsic item minima for auto-track contributions and before fixing the width used to measure row height. A smaller preferred width must not hide the minimum in either path.

MOL-465: browser regression covers min-content/max-content with auto,0px and50px preferred widths, track positions and row heights. The two pre-fix failures were next-column x40 instead of60 and row height60 instead of20. The Webfont grid nontermination control still completes.

cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast:20277 passed,18 skipped. Initial partial-fix failure logs retained.

Original-commit: 3b602b4240
2026-10-21 17:55:02 +08:00
ldm0 64a6498627 fix(layout): terminate fractional grid track growth
Pin Taffy5453d6cd, whose remaining-growth subtraction uses the same rounded base-plus-increase value as its growability predicate. This prevents a zero-growth iteration from repeating forever.

MOL-464: the new bounded CLI test fails after10s before the pin and passes afterward. The nested grid, percentage margin and Webfont reproducer also completes in0.17s; this trigger hangs in both1.1.17 and1.1.18.

cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast: 20276 passed,18 skipped. A disk-full compilation attempt is retained separately; the successful full retry passes.

Original-commit: 163941940d
2026-10-21 17:55:02 +08:00
ldm0 d4b0ad257d chore(release): update version to 1.1.19 2026-10-21 04:28:56 +08:00
BibekPathak 6ce547ed8e test(cdp): verify Browser.close process exit and profile reopen 2026-10-20 20:47:16 +08:00
ldm0 d75c82c30a perf(fetch): share immutable request bodies with Bytes 2026-10-19 11:22:56 +08:00
ldm0 1275fb7016 chore(deps): upgrade curl bindings and bundle libcurl 8.23
Pin the fork rebased onto upstream curl-rust 0.4.51, including the native
pre-request API and libcurl 8.23 with the upstream connect-only eviction fix.
Enable the upstream apple-sectrust feature explicitly in moli-curl.

Keep Moli proxy endpoints explicit while adapting transport comparisons to
libcurl's implicit HTTP port and hostname validation. Update form wire
request assertions to preserve the empty query already in navigation URLs.

Validated workspace formatting, warnings-as-errors Clippy, and all 20,342
nextest cases (18 skipped). The curl fork passed Linux/macOS/Windows CI.
2026-10-19 03:53:12 +08:00
ldm0 012bd10983 refactor(fetch): use curl-rust pre-request callbacks
Pin curl and curl-sys to the native callback API from curl-rust#1 and replace
the handwritten callback registration with Handler::prereq / Easy2::prereq.
Keep each collector's captured timing token and re-enable the callback after
reset; the dependency owns userdata lifetime and C panic handling.
2026-10-19 03:00:24 +08:00
ldm0 db2c33810b perf(layout): expose stage timings and a native cost probe 2026-10-17 20:06:22 +08:00
ldm0 2a52e93338 chore(release): update moli to 1.1.18 2026-10-17 04:53:48 +08:00
ldm0 91544b6694 fix(fetch): preserve cancellation across response selection
Delegate subrequest cancellation to Tokio CancellationToken while retaining
transfer-local completion arbitration and cancellation-safe adoption.

Commit buffered final response progress before delivery and materialize CORS
follow responses after dropping intermediate redirect and preflight bodies.
Cover cancellation/selection races and buffered response completion.
2026-10-17 01:25:36 +08:00
ldm0 c28b7d5fb9 refactor(layout): consume Parley's positioned visual clusters 2026-10-16 11:00:41 +08:00
ldm0 e10fe9c440 fix(layout): resolve intrinsic width constraints in shared sizing 2026-10-14 22:23:06 +08:00
ldm0 44a2e88d5a feat(crypto): add opaque self-signed certificate primitives 2026-10-13 17:41:15 +08:00
ldm0 fc19126d45 fix(deps): update vulnerable Rust dependencies 2026-10-13 14:12:07 +08:00
ldm0 cac20d15b8 chore(release): update version to 1.1.17 2026-10-13 01:52:59 +08:00
ldm0 778a35bd07 fix(paint): restore Muse pill corners and SVG colors 2026-10-13 00:17:07 +08:00
ldm0 1c25ae86ba build(pdf): deduplicate fontations via subsetter patch 2026-10-12 21:33:26 +08:00
ldm0 53d16780d5 feat(pdf): render searchable PDFs with Krilla
Route CDP Page.printToPDF and CLI PDF dumps through an owned snapshot PDF
backend with embedded subset fonts and logical text cluster mappings.

Preserve print layout isolation, page selection, and bounded local raster
fallbacks. Pin Krilla to upstream Git and share its font parsing dependencies
with the existing rendering stack where version constraints allow.

Add PDF extraction, pagination, graphics, and print lifecycle regressions,
fixed font fixtures, and reader and CDP smoke checks.

Refs #279.
2026-10-12 21:33:26 +08:00
ldm0 4c31485151 fix(url): preserve file URL hosts and leading path segments
Vendor rust-url 2.5.8 with narrowly documented file-URL parsing fixes. Preserve leading empty path segments, retain non-local hosts while normalizing Windows drive letters, and apply the same rules to relative resolution and pathname setters. Include licensing, the upstream fixtures, native URL regressions, and JavaScript URL property regressions.
2026-10-12 01:07:26 +08:00
ldm0 1404fa344b perf(accessibility): avoid JSON intermediates in semantic dumps
Large semantic dumps retain a JSON object graph with allocated field names
and string node references for every AX node before formatting the output.

Build compact typed nodes with numeric references and pass them directly
from the renderer to the CLI. Keep one AX traversal for both typed nodes
and CDP payloads, converting protocol nodes individually as they are built.
Preserve omitted/empty fields, field insertion order, list markers, and
frame-root attachment order. Render text iteratively and trim in place.

Add compatibility coverage and a standalone benchmark that stages both
executables on the same filesystem, alternates runs, records peak RSS and
wall time, and rejects changes to dump output bytes.

Against main at 5f5e1fff3 on a generated 40,000-row list (three interleaved
runs, medians):
- semantic_tree_text: 718.42 -> 390.96 MiB; 2.919 -> 2.204 s.
- semantic_tree: 815.71 -> 483.81 MiB; 2.484 -> 2.369 s.
- markdown control: 95.52 -> 95.59 MiB; 0.895 -> 0.913 s.

A generated 200,000-row list also completes with identical bytes (one run):
- semantic_tree_text: 3473.02 -> 1775.07 MiB; 13.245 -> 10.015 s.
- semantic_tree: 3803.45 -> 2137.26 MiB; 12.626 -> 10.397 s.

JSON/text comparisons also match the baseline on a mixed fixture containing
hidden/ignored nodes, form values, list markers, shadow DOM, and child frames.
These generated fixtures are independent of the external MOL-269 evidence.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,885 passed, 17 skipped)
- cargo build --release -p moli

Refs: MOL-269
2026-10-11 17:37:40 +08:00
ldm0 b2b51a5525 chore(release): bump version to 1.1.16 2026-10-10 19:24:34 +08:00
ldm0 7e93cca631 fix(indexeddb): validate native schema key paths before mutation
Validate native object-store and index schema key paths using Unicode identifier rules, including dotted paths and sequences. Preserve syntax/duplicate/invalid-option precedence and reject invalid metadata before mutating the backend. Map native Syntax and InvalidAccess errors to their DOM names. Tests cover Unicode paths, invalid sequences and failed creations leaving metadata unchanged. Renderer argument/receiver migration is separate.
2026-10-10 12:09:13 +08:00
ldm0 8c1c35df5a chore(release): update version to 1.1.15 2026-10-07 18:47:14 +08:00
ldm0 561edec134 build: refresh Parley fork to d0f5452
Pin Parley and Fontique to the reviewed fork with clarified bidi contracts, a separate first-style line-height compatibility commit, and transparent-marker benchmarks. Update the same-source workspace crates in Cargo.lock without changing package versions or other dependencies.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19,676 passed, 16 skipped).
2026-10-07 18:34:42 +08:00
ldm0 b5f4e788aa build: update Parley to the PR1-based inline object fork
Pin Parley and Fontique to 813c8c1120c6dee61f838f2cc2ec4efedc08b9ea on fix/inline-object-bidi-rebased. The fork contains the three inline-box bidi PR commits followed by the transparent marker, visual edge placement and host embolden extensions. Keep the original fix/inline-object-bidi branch intact.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19676 passed, 16 skipped).
2026-10-07 18:34:42 +08:00
ldm0 00e18d6aef build(deps): update indexmap to 2.14.2 2026-10-07 18:23:02 +08:00
ldm0 9d16dc1c65 build(deps): update rusqlite and hashlink 2026-10-07 18:23:02 +08:00
ldm0 3e3d4d3e5e perf(style): inline single effects during DOM mutation conversion
Return SmallVec<[StyleMutationEffect; 1]> from from_dom_mutation_effects.
Handle a pure single character-data update inside the converter before
constructing the deduplication set. Keep the notification call uniform;
batches preserve their existing order and deduplication.

Cover repeated text updates, :empty styles, and MutationObserver old values
in live and windowless documents.

Validation of the resulting branch:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)

Performance vs parent b75de5c66f (fixed local WeChat HTML, release,
JS/CSS/subframes disabled, 100 balanced randomized pairs):
Wall median 180.575 -> 165.316 ms (-8.45%). Paired median saving
13.885 ms; bootstrap 95% CI [12.364, 19.486] ms. The code tree matches
the previously validated and measured SmallVec version 84c5a81cca.
2026-10-07 03:28:07 +08:00
ldm0 7fe5c0913e fix(layout): place inline decorations at physical bidi edges
Position transparent opening and closing edges around their visual descendants
after bidi reordering and before alignment. Keep the logical edge widths used
by line breaking while honoring CSS direction for physical padding and borders.

Move the inline-object bidi patch onto current upstream Parley main and pin
the fork at 8eb00ef5e628b1bba95dcde88658deb2a5aed1b5. Adapt the new font,
metrics, whitespace and layout APIs while preserving neutral atomic analysis.
Preserve the browser's synthetic-bold policy through Fontique's host threshold.

Use structural style ancestry for inline text masks so physical edge ordering
cannot change which glyphs belong to a background-clip:text target.

Add 96 Chromium-verified decoration cases covering natural RTL and mixed text,
CSS directions, asymmetric padding and borders, and layout publication. Add a
Chromium-verified paint test for ordinary and nested LTR/RTL text masks.
2026-10-06 16:51:41 +08:00
ldm0 d8e7c37723 fix(layout): resolve atomic inline bidi levels through Parley
Resolve inline objects independently so an atomic sibling outside a closed
RTL context follows the surrounding text instead of the preceding RTL run.
Pin the Parley 0.11.1 fork repair and its shared Fontique source.

Declare atomic and transparent boundary roles at the Moli adapter, keeping
opening edges with the next participant and closing edges with the previous
item. Add 336 Chromium-verified geometry cases across document modes,
contexts, directions, breaks and atomic placement, including publication.
2026-10-06 16:51:41 +08:00
ldm0 761b39bc84 feat(webidl): derive native interface brand checks
Add interface and brand_check field attributes to argument and dictionary derives, including variadic object arguments. Preserve native object identity and validate brands at each field conversion position.

Cover nullability, conversion order, cross-realm errors, registered native proxies, and invalid attribute combinations.
2026-10-06 13:35:34 +08:00
ldm0 c345a594f4 feat(webmcp): implement document tools and CDP integration
Expose secure Document.modelContext APIs with document-owned registrations,
callback realm and input validation, task-based result delivery, and independent
caller cancellation and target completion. Preserve cancellation reasons and
emit lifecycle events only for live owners.

Register native declarative forms in light and shadow trees through indexed
mutation candidates. Track schema changes to valid forms even before a
registration succeeds, including controls associated through a form attribute.
Use changed containers only for ancestor and form-owner checks; inspect added
and removed subtrees for discovery. Retire registrations at actual removal and
owner transitions while preserving submit handling and captured pending responses. Apply validated
fill intents to current options and checkable values in control event order.

Compute tools delegation from committed security origins, ancestor header
allowlists, container declarations, redirects, and combined sandbox policies.
Carry invocation identity, original origin, and resolved target through form
navigation; accept same-origin JSON-LD results and reject cross-origin commits.

Connect typed renderer observations to CDP discovery, invocation, cancellation,
and Runtime result projection. Include renderer and protocol regression coverage
for document lifetime, reentrancy, permissions, dynamic controls, and cancellation.

Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [ 100.619s] 19320 tests run: 19320 passed, 16 skipped
2026-10-05 15:25:06 +08:00
ldm0 ca0a4c81a2 feat(webmcp): add native form schemas, fill intents, and activity states
Introduce moli-webmcp for native form schema synthesis, complete input validation,
numeric conversion, and JSON-LD results. Preserve requested selection values in
fill intents so the renderer can apply them to current controls after author
input events.

Add native tool activity states, selector support, control helpers, and
a namespace-aware form index that includes open and closed shadow trees.
Pin the Stylo revision providing the activity pseudo-classes.

Validation on this commit tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast.
Summary [  98.804s] 19248 tests run: 19248 passed, 16 skipped
2026-10-05 15:25:06 +08:00