Commit Graph
102 Commits
Author SHA1 Message Date
ldm0 417946cc5f fix(iframe): centralize document load delivery 2026-10-12 02:11:34 +08:00
ldm0 e806cfbeb3 fix(iframe): dispatch one initial load for adopted frames
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.

Includes the ablation-confirmed cleanup from e5491f4b65.
2026-10-11 21:06:50 +08:00
ldm0 876de3b64a fix(window): queue initial javascript URLs on the target page
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.
2026-10-11 21:06:06 +08:00
ldm0 09bcbd0566 fix(window): avoid replaying completed auxiliary document lifecycle
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.
2026-10-11 21:04:27 +08:00
ldm0 7f0c43968f fix(window): share inherited document.domain across related pages
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.
2026-10-11 09:01:44 +08:00
ldm0 8da6e45897 fix(xhr): reject open in retired child document realms
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.

Includes the ablation-confirmed cleanup from c4f80eb35c.
2026-10-11 08:59:40 +08:00
llk bd246f6b92 test: isolate navigation loads and deterministic font and HTTP fixtures 2026-10-11 08:14:05 +08:00
ldm0 07c09b138e fix(webdriver): scope dialog load waits to the target page
Query dialogs on the addressed Page when waiting for navigation lifecycle milestones. Allow independent page load completions to advance while another page has a blocked load.

Cover normal and eager navigation with gated two-window regressions, eager recovery after accepting an alert, and dialog ownership across DevTools attachments.
2026-10-11 06:48:09 +08:00
LeandroPG19 d4e635cd52 style(scheduler): drop explanatory comments from dialog wait fix 2026-10-11 06:48:09 +08:00
LeandroPG19 5a50f45b85 fix(webdriver): stop sync alert during page load from hanging the session
While a JavaScript dialog is open, the scheduler no longer waits for the
page load to finish. WebDriver Classic commands using the normal and eager
page load strategies now return, and the session stays usable.

Fixes #809
2026-10-11 06:48:09 +08:00
ldm0 5f5e1fff36 fix(window): retain the name of closed auxiliary windows
Validation on the original split base: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.
2026-10-11 01:44:57 +08:00
ldm0 20b9a7a33c fix(runtime): allow removing bindings while debugger is paused 2026-10-10 17:51:54 +08:00
ldm0 78f43c201b fix(dom): resolve foreign reflectors in their owning page
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings.
Nextest and WPT reruns omitted at the user's request.

Includes the ablation-confirmed cleanup from c1fe3ea895.
2026-10-10 03:34:22 +08:00
ldm0 497f4d275e fix(history): give initial auxiliary documents one history entry
Validation on this branch: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-09 02:47:39 +08:00
ldm0 f32553ed04 fix: clarify renderer exports and preserve allocation-free error handoffs 2026-10-08 19:56:33 +08:00
ldm0 c31404d801 refactor: use stable atomic updates and fixed-size slice chunks 2026-10-08 19:56:33 +08:00
ldm0 24ef334500 fix(renderer): replace the Service Worker client on initial Document commit 2026-10-06 01:01:03 +08:00
ldm0 85332301b2 fix(renderer): disable subframe loading during document retirement 2026-10-06 01:01:03 +08:00
ldm0 fcadef16be fix(renderer): protect Document access and retained realm identity 2026-10-06 01:01:03 +08:00
ldm0 f9837b4ad5 fix(cdp): harden popup realm transitions
Enforce document and Location authority at realm boundaries, preserve Window-owned timer and Service Worker completion state across initial commits, and retire isolated-world IndexedDB handles without pinning the old realm.
2026-10-06 01:01:03 +08:00
ldm0 30e36e64a3 fix(cdp): preserve auxiliary Page ownership through document navigation
Create script auxiliary Pages synchronously and let their CDP targets adopt
those exact Pages. Preserve Page and WindowProxy identity through document
navigation, sharing browsing-context names, opener references, message endpoints
and close state with related windows.

Commit browser responses into the existing Page with exact document admission,
cancellation and failure disposition. Capture accepted navigation origin, base,
policy, storage and referrer, preserve auxiliary history and restore related
browsing-context groups without issuing duplicate popup requests.

Reuse the initial same-origin Window while replacing its Document, and centralize
Document owner transitions, descendant retirement and Inspector publication.
Give related Pages independent Inspector routes and shared per-Page startup
pause state, route isolate foreground work through surviving Pages, and cache
cross-origin Window functions in each accessing realm with receiver-aware access.

Cover actual popup state, navigation and parser rebinding, accepted environments,
history, cross-origin access, multiple frontends, cancellation and task retirement.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-06 01:01:03 +08:00
ldm0 f1c5bf6618 fix(cdp): separate browser window selection from document activity
Track each window's selected tab and browser focus independently of protocol
page routing. Keep window bounds, adjacent-tab close selection, discovery and
target metadata consistent with their owning windows and documents.

Queue renderer activity updates outside the CDP actor, preserve their output
fences and remember admitted activity so focus reversals survive a busy page.
Cover window selection, focus-event state and busy-context activation.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
2026-10-06 01:01:03 +08:00
ldm0 99f18435ed test(cdp): check debugger retirement after navigation commits 2026-10-05 05:26:00 +08:00
ldm0 6f390355b3 test(cdp): synchronize superseding navigation through shared waiters 2026-10-05 05:17:31 +08:00
ldm0 fc2a45a9eb test(webdriver): wait for form navigation with BiDi attached 2026-10-05 05:16:44 +08:00
ldm0 427b2dea01 refactor(config): carry complete startup layout configuration 2026-10-04 05:20:17 +08:00
ldm0 df410aeeb7 feat(layout): add --hide-scrollbars for fetch and serve
Hide native scrollbars and automatic gutters while preserving scrolling and explicit stable gutters. Require layout mode and retain the setting across navigation, frames, and protocol sessions.

Refs #1081
2026-10-04 05:20:17 +08:00
ldm0 32de272640 fix(cdp): keep current renderer notifications live during navigation 2026-10-04 03:12:50 +08:00
ldm0 2094dd2c0e test(cdp): gate deferred script response on ready task callbacks 2026-10-03 23:59:59 +08:00
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