Commit Graph
74 Commits
Author SHA1 Message Date
ldm0 330b8c6381 refactor(renderer): resolve scoped nodes within read operations 2026-10-03 03:30:39 +08:00
ldm0 eb2d679e44 refactor(automation): name semantic commands and renderer CDP calls 2026-10-01 16:51:46 +08:00
ldm0 75b191092d fix(cdp): keep DOM agent commands available while paused 2026-10-01 03:33:13 +08:00
ldm0 f62894ec3c refactor(cdp): publish Emulation replies with exact replay ownership
Use the shared frontend admission and native terminal path for renderer
configuration. Keep Browser replay policy on its captured owner, record
admitted idle state, and project a fallback only if publication lost.

Verify mixed native replies precede later Inspector replay and that
isolate-entering configuration waits for the suspended owner to resume.
2026-10-01 03:33:13 +08:00
ldm0 69b3f96239 refactor(cdp): publish DOM and debugger replies with ordered state updates
Migrate node queries, edits, focus, files, remote objects, DOMDebugger and
Autofill to renderer-owned terminals. Freeze document notifications and
object registry updates at the producer boundary, preserve object aliases,
and keep isolate-entering lookup chains on the owner turn.
2026-10-01 03:33:13 +08:00
ldm0 44011a899c refactor(cdp): publish CSS and accessibility replies at the renderer
Run native lookups and bounded continuations through the shared terminal
path. Publish stylesheet inventory notifications before ready responses,
and preserve exact owner routing in direct Page test fixtures.

Use the parsed fixture and stylesheet notification boundary to verify
Page and CSS commands preserve their independent isolate-entry requirements.
2026-10-01 03:33:13 +08:00
ldm0 a18314640a refactor(cdp): publish native terminals through the renderer journal
Share terminal authority with Inspector and publish ready native replies
after their renderer facts, independently of adapter polling. Keep typed
internal completions separate and settle caches against the exact residence.

Define exhaustive backend entry requirements for nested Main dispatch and
release Main and IO admission at backend entry. Bind native continuations
and preserve their owner lifecycle before terminal projection.

Migrate Page and DOMSnapshot through the generic operation boundary,
including live tree URLs, initial DocumentLoader identity, document capture
and isolated worlds. Cover cancellation, retirement and pause ordering,
and release held popup fixture routes before awaiting initialization.
2026-10-01 03:33:13 +08:00
ldm0 89863e976c fix(cdp): replay Runtime notifications before enable responses
Publish existing contexts, console messages and exceptions before the
Runtime.enable terminal for pages and workers. Check the enable boundary
without a compensating command, and retain deferred reply progress.
2026-10-01 03:33:13 +08:00
ldm0 14cc9792ef fix(encoding): exclude HTML meta from XML encoding selection
Give document decoding explicit HTML, XML, and text declaration policies.
XML ignores HTML meta elements, retains BOM and transport charset precedence,
and selects an initial XML declaration or UTF-16 signature before its UTF-8
default. Keep partial declarations and signatures buffered across chunks.

Cover conflicting meta declarations with and without an XML declaration,
including main documents, iframes, and external raw input. Adapt seven
Chromium XML/XHTML navigation scenarios and three decoder boundary tests
from Chromium a03603fe9af6230a12f1b2fb2c18a7d003a0d937; source paths are
recorded next to the tests. These include KOI8-R script inheritance, CP1251
XML, BOM-less UTF-16, supplementary Unicode characters, and BOM boundaries.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- XML and Chromium regression tests passed.
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast:
  18,980 passed, 16 skipped.
2026-09-29 18:01:12 +08:00
ldm0 83a78cf6e3 fix(document): decode main XML responses before parsing
Keep network XML response bytes intact through the existing raw-body renderer
path. Decode both network and external XML bodies with the shared response
decoder, then install the selected encoding before document bootstrap.
Remove the obsolete ready-body capture variant used by the old XML path.

Cover matching main-document and iframe text, namespaces, and characterSet for
Atom, RSS, and text/*+xml responses with Windows-1252 headers, XML declarations,
and UTF-16LE/BE BOMs. Exercise the external input as single-byte chunks and
verify that BOMs override a conflicting transport charset.

Validation:
- Before the fix, the network regression returned caf� / UTF-8 instead of
  café / windows-1252.
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- Six focused XML tests passed.
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast:
  18,954 passed, 16 skipped.
2026-09-29 18:01:12 +08:00
ldm0 a3af75845d fix(document): preserve inherited encoding and XML MIME routing
Keep valid inherited text encodings ahead of heuristic detection while
preserving BOM, transport charset, and JSON default precedence. Share the
response decoder between streaming main documents, asynchronous child
loads, data URLs, and blocking child snapshots.

Classify navigation XML MIME types independently of DOMParser's allowlist,
including +xml subtypes in parser routing and text exclusions. Add
regressions for inherited UTF-8, literal encoding declarations, XML
namespaces, and DOMParser rejection of navigation-only XML types.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- NEXTEST_TEST_THREADS=8 cargo nextest run --no-fail-fast
  18,952 passed, 16 skipped. Two existing timing tests failed under the
  default concurrency, then passed individually and in the full run above.
2026-09-29 18:01:12 +08:00
lanyue-llk 345ba4cbc4 fix(document): share literal text parsing across child document paths 2026-09-29 18:01:12 +08:00
lanyue-llk 9d236a20ef fix(parser): preserve text document MIME and encoding semantics 2026-09-29 18:01:12 +08:00
ldm0 91a4480b8a fix(protocol): retain navigation ownership during response body reads
Keep request identity and cancellation in Fetch while read tasks exclusively own response data. Match completions to the registered read instead of reinserting transfers or replying to navigations from I/O completion.

Retire superseded reads immediately, drain reads on Fetch disable, and preserve typed read errors. Cover delayed successes, failures, request reuse, cancellation, and debugger-paused supersession.
2026-09-29 02:50:43 +08:00
ldm0 3289d5b4c3 fix(scheduler): let replacement navigation pass load-blocked work
Centralize navigation dependency decisions for readiness probing and snapshot draining. Replacement actions can reach the owner that cancels the pending request even when earlier observations wait for that load, while exact owner authorization remains mandatory.

Keep retirement admission policy beside publication ownership. Extend coverage for stale owners, cancellation, reused frontend ids, duplicate terminals, and late results without reviving retired notifications or remote objects. The new queue regression fails before the scheduler fix.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (18833 passed, 16 skipped on the final change set).
2026-09-29 02:36:54 +08:00
ldm0 255238328f fix(protocol): retire superseded intercepted navigations
Only the current navigation can suspend renderer output; older jobs retain cleanup ownership without blocking the active document.

Retire target-owned request, auth and response interceptions on supersession, cancel streaming transports and reject stale body-read completion. Cover paused debuggers, overlapping navigations, target isolation and once-only terminal replies.
2026-09-28 20:11:15 +08:00
ldm0 c4d0cac89a refactor(renderer): own document replacement debugger lifecycle
Move old-document debugger termination into renderer preparation scopes instead of tracking protocol navigation IDs in DevTools. Reject superseded response jobs using exact navigation tokens and cancellation authority, and retire their renderer-channel suspension independently.

Cover response interception and supersession while paused, repeated pauses, and prepare commit/cancellation/drop cleanup. Verified cargo fmt --all, workspace all-targets all-features clippy with warnings denied, 18444 nextest tests, and 20 stress iterations of 127 focused tests.
2026-09-28 20:11:15 +08:00
ldm0 79ea1406fa fix(devtools): unblock navigation while the debugger is paused
Track provisional loads by navigation ID on the existing renderer target and explicitly finish debugger policy on commit or cancellation. Return the pause-loop exit reason and terminate paused old-document execution through V8 Inspector.

Defer intercepted-response document creation until continuation, removing the eager prepared-document paths. Preserve committed documents for aborted navigations and cover repeated pauses, multiple sessions, interception and supersession.

Validated cargo fmt --all, strict workspace clippy, and cargo nextest run --no-fail-fast: 18,429 passed, 13 skipped. New regressions also passed 20 stress iterations and three confirmed debugger-paused ippure navigation probes.
2026-09-28 20:11:15 +08:00
ldm0 5fb8e4dfbb test(protocol-server): split websocket tests 2026-09-27 17:04:40 +08:00
ldm0 b8bc1b9650 test(protocol-server): split classic WebDriver scenarios 2026-09-27 07:18:02 +08:00
ldm0 ff5451a205 test(protocol-server): split BiDi scenarios 2026-09-27 07:18:02 +08:00
ldm0 ddbf52a668 feat(layout): initialize shared geometry on first demand 2026-09-27 01:43:26 +08:00
ldm0 ff782ab21a fix(navigation): admit renderer navigation that supersedes a pending load 2026-09-26 06:00:11 +08:00
ldm0 4b24590ce6 fix(layout): isolate PDF print layout from interactive snapshots 2026-09-25 10:19:22 +08:00
ldm0 179241dedd refactor(layout): publish layout only through explicit visual output
Make geometry, input and observers read the latest published layout without
cold-start or invalidation-triggered layout. Only screenshot, screencast and
PDF output can build and publish a new tree.

Connect WebDriver page screenshots to the shared output pipeline, explain how
to initialize layout in errors, and migrate fixtures to explicit publication.
Remove obsolete read policies and embedded-frame completeness metadata.
2026-09-25 10:19:22 +08:00
ldm0 da6df4375f fix(layout): reuse compatible snapshots after interactions 2026-09-25 10:19:22 +08:00
ldm0 1933cec74f refactor(input): centralize editing and native element clicks 2026-09-23 23:06:17 +08:00
ldm0 4d10ff1916 fix(input): preserve Enter cancellation and multi-character text
Dispatch a cancelable insertLineBreak beforeinput before implicit form
submission, including default submit button activation. Require a standalone
CR when inferring Enter from character text.

Cover combined keydown, standalone char, and embedded-CR input so text is
preserved without accidental submission.

Temporarily ignore the two Chromium-verified iframe overlay click tests
pending separate implementation fixes.
2026-09-23 23:06:17 +08:00
lanyue-llk 7bf36c9823 fix(input): preserve activation and navigation boundaries 2026-09-23 23:06:17 +08:00
lanyue-llk bcf420f622 revert: undo split PR 640 merges (#734-#740) 2026-09-22 20:02:07 +08:00
mini llk cba79021aa fix(document): parse text responses with consistent decoding (#740)
* fix(parser): preserve text document MIME and encoding semantics

* fix(document): share literal text parsing across child document paths

* fix(document): construct projection parser with the public API
2026-09-22 19:50:42 +08:00
mini llk 50a4242b2e fix(input): preserve activation and navigation boundaries (#736) 2026-09-22 19:45:14 +08:00
BibekPathak 8032606abf report offline navigations as network failures, not -32000 2026-09-20 10:54:25 +08:00
BibekPathak f3ef88f6dc fix(cdp): allow loopback navigations under offline emulation 2026-09-20 10:54:25 +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 0d6cee5dde feat(cdp): add --cdp-screencast-fps option 2026-09-16 14:59:42 +08:00
ldm0 3bead42808 refactor(emulation): use native process-wide ICU defaults
Remove the Date/Intl wrappers, custom date parser and per-Page replay state. Keep exclusive locale/timezone ownership in a process controller and refresh existing Page and Worker isolates through generation-bound notifications and observation boundaries, including nested Inspector pauses.

Release claims on session/target/context retirement, retain native coercion and locale matching, and cover lifecycle restoration with Rust, BiDi and process-isolated CDP regressions.
2026-09-13 01:07:35 +08:00
ldm0 391742c14b feat(websocket): use native curl transport 2026-09-10 14:37:03 +08:00
ldm0 e194c2add8 refactor(html): centralize input type states
Extract an independently mergeable topic from wpt-misc-fix at
a70a96f9d1.

Source commits:
- 05e2cd5350

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast
2026-09-10 04:05:23 +08:00
ldm0 669173367d fix(fullscreen): remove historical page aliases 2026-09-08 14:57:19 +08:00
ldm0 49ea8a3e1c refactor(cdp): centralize session disposal 2026-09-04 04:39:43 +08:00
ldm0 017c53de8c build(v8): migrate Moli to V8 15.2 2026-09-03 15:17:48 +08:00
ldm0 5c9ce1adcd Remove renderer backqueries from inspector output routing 2026-09-01 19:52:16 +08:00
ldm0 2a10f8efca fix(cdp): harden document and navigation lifecycles 2026-09-01 00:12:24 +08:00
ldm0 42c4f1218a fix(cdp): isolate and route stable page targets 2026-09-01 00:12:24 +08:00
ldm0 fff356767f refactor(target): own stable pages in target hosts 2026-09-01 00:12:24 +08:00
ldm0 35ec45fca3 perf(cdp): defer default target runtime creation
Represent the published default page as a target-catalog placeholder with an explicit lifecycle. Materialize it only when an operation needs a live page owner; activate and close the placeholder directly, and create new targets without first constructing the default page.\n\nMake NavigationEngine initialization explicit so read-looking access cannot silently allocate the deferred runtime.
2026-08-31 04:31:23 +08:00
ldm0 51e110896f fix(cdp): report missing native dialog handler 2026-08-28 19:19:33 +08:00
ldm0 82c2f65fcb test(cdp): ignore stale tab attach events after navigation 2026-08-27 18:04:19 +08:00
ldm0 5f753d36bf fix(cdp): publish a real default discovery target 2026-08-27 18:04:19 +08:00