Commit Graph
1980 Commits
Author SHA1 Message Date
ldm0 071e553e5b refactor(dom): name atomic move semantics consistently 2026-11-13 02:01:36 +08:00
ldm0 1ed0e2238e fix(cdp): apply late request policy before commit projection
A newly committed native Document can execute before its commit output has
been projected into protocol state. Routing Fetch.enable through the
projected binding then updates a loaded predecessor or no Page at all,
allowing requests to bypass interception after a successful ACK.

Address restricted request-policy updates to the synchronously admitted
renderer Page and wait for native completion. Reuse this route for Fetch
cleanup and blocked URLs without granting general unbound Document access.

Hold actual native commit publications in the regression and inspect the
exact evaluation output fence. Cover new/replaced Pages with interception
enable/disable and blocked URLs, with no external I/O in negative controls.
The original controlled reproducer fails 3/3 on the rebase baseline.

Validation: fmt; workspace/all-targets/all-features Clippy; 23,026 Nextest
passed, 20 skipped; three targeted tests x20 and 30 module tests x5, all
without retries.
2026-11-13 01:42:40 +08:00
ldm0 bf819ba3ce fix(dialog): read closedby from the null namespace 2026-11-13 01:42:40 +08:00
ldm0 8348e735d2 fix(dialog): honor closedby none for Escape requests
Honor closedby=none before dispatch and after cancel listeners. Match Chromium case handling and invalid-value defaults, keep script closure available, and cover dynamic policies and a disabled topmost modal.
2026-11-13 01:42:40 +08:00
ldm0 e454dd9cc3 fix(dialog): clear modal registration on node removal and adoption
Clear native modal state and the old Document registration when connected nodes are removed or adopted. Keep validated atomic moves in their original opening and priority, including the split DOMDebugger path. Cover light and shadow subtrees, adoption and background inertness.
2026-11-13 01:42:40 +08:00
ldm0 523f0ba783 fix(dialog): bind Escape close requests to one modal opening
Capture the Document, dialog and opening generation before cancel dispatch and verify them before closure. Removing open invalidates the request without clearing modal registration. Cover close/reopen, nonmodal reopen, raw attribute toggles, no-op operations and exact queued close-event counts.
2026-11-13 01:42:40 +08:00
ldm0 51b3dd516a fix(dialog): use internal keyboard state for Escape
Read the trusted keyboard key from its internal backing so page-owned properties and prototype getters cannot change the Escape default action.
2026-11-13 01:42:40 +08:00
ldm0 454052c5a9 fix(dialog): dismiss modals in opening order per document 2026-11-13 01:42:40 +08:00
BibekPathak 00a464b355 fix(dialog): light-dismiss modal dialogs on Escape 2026-11-13 01:42:40 +08:00
ldm0 54988a7960 refactor(indexeddb): replace lifecycle slots with typed access
Read and update transaction status directly in Rust. Keep request readiness
and cursor positions as an enum and Option<usize>, and access database
lifecycle state through typed operations.

Preserve traced request values in the V8 heap behind a closed field enum
so request/result cycles remain collectible. Remove string slot dispatch,
property shims, the unused blocked marker and duplicate database scope.
2026-11-13 01:39:46 +08:00
ldm0 4c51eab400 refactor(indexeddb): remove legacy schema state adapters
Use typed metadata as the only store name source. Remove retired metadata
slots, descriptor projection, swallowed writes and the mutable index marker;
classify cursor sources by their native wrapper kind.

Make queue scope types explicit, exercise StoreId in admission tests, and
centralize renderer metadata lookup by schema ID. Retain failed schema
handle attributes and immutable metadata needed for rollback.
2026-11-13 01:39:46 +08:00
ldm0 b8190ee87d refactor(indexeddb): address SQL schema by stable IDs
Use the persisted StoreId and IndexId in SQL commands, transaction scopes and renderer handles. Reserve IDs without waiting for the SQL owner and recover their counters with committed disk metadata.

Remove name-based request targets, separate renderer identity tokens and cursor name refresh. Cover concurrent reservations, abort, idle reconnect, catalog recovery, restart, stale IDs and old-name reuse.
2026-11-13 01:39:46 +08:00
ldm0 ff19670cf9 fix(indexeddb): freeze request sources after argument conversion 2026-11-13 01:39:46 +08:00
ldm0 f76be5f259 feat(indexeddb): wire transactional schema name setters
Expose native name accessors and queue the existing SQL rename commands with schema validation. Keep stable schema identities across metadata edits and rollback, and capture cursor source names at operation admission. Preserve names on finished handles.
2026-11-13 01:39:46 +08:00
ldm0 0766ae0ab3 refactor(renderer): align page script host helper names 2026-11-13 00:46:54 +08:00
ldm0 dc84a7ffab refactor(renderer): clarify script host and shared isolate names 2026-11-13 00:29:11 +08:00
ldm0 72f22d18f6 fix(selection): sync all Selection associations on Range mutation
Source-commit: b5d2f8db61
2026-11-12 23:38:59 +08:00
ldm0 1c00ef7443 fix(dump): strip adopted shadow stylesheets from exports 2026-11-12 23:26:36 +08:00
ldm0 72c21bbccf test(renderer): align serialized HTML with author shadow roots 2026-11-12 23:26:36 +08:00
lanyue-llk 35961377ba fix(dump): include and strip shadow roots in html dumps 2026-11-12 23:26:36 +08:00
lanyue-llk d529fe2d00 fix(dump): keep child frame shadow roots and scripting flags in html dumps 2026-11-12 23:26:36 +08:00
lanyue-llk 7aa69b1e77 fix(dump): nest and strip child frame documents in html dumps 2026-11-12 23:26:36 +08:00
ldm0 130ab00aaf fix(fetch): preserve navigation interception on worker fallback 2026-11-12 20:10:31 +08:00
ldm0 03050ca66d fix(fetch): retain native service worker navigation requests 2026-11-12 20:10:31 +08:00
ldm0 e363e2d81d fix(cdp): retain protocol body projections across redirects 2026-11-12 20:10:31 +08:00
ldm0 bc153f0165 refactor(fetch): capture redirect requests at their source 2026-11-12 20:10:31 +08:00
ldm0 068874f363 fix(pdf): preserve printing when link deduplication hits its budget
Sweep link candidates by full target and reject impossible containment using polygon bounds. Keep the original clipped regions when optional deduplication exhausts its work budget. Cover dense HTML printing, PDF annotations, partial-work fallback, and target identity.
2026-11-12 19:34:38 +08:00
lanyue-llk 7521d39219 fix(scheduler): keep source fairness runs across lifecycle turns 2026-11-12 17:58:59 +08:00
ldm0 62a5961ee2 test(fetch): validate URL credentials at forwarding boundaries
Keep the Window fixture alive through the negative cases and assert the exact credentials error. Exercise real Worker fetch forwarding for native Request variants, including POST bodies, and reject converted URLs before networking.
2026-11-12 17:37:03 +08:00
ldm0 238b182ccb refactor(fetch): use anyhow for window fetch preparation
Replace the preparation error enum with anyhow::Result. Preserve context error messages, direct URL/WebIDL error propagation, and the existing Promise rejection path.
2026-11-12 17:37:03 +08:00
ldm0 b177447a12 fix(fetch): preserve native Request URL provenance
Extracted from development commit b0e803695e.

Adapted to the target branch APIs. Validated with cargo fmt --all, full workspace Clippy (-D warnings), and cargo nextest run --no-fail-fast before committing.
2026-11-12 17:37:03 +08:00
ldm0 f0c484b7d8 fix(indexeddb): validate clear before creating requests
Source-commit: dd415580ac
2026-11-12 17:25:11 +08:00
ldm0 e7ac1c1a4a refactor(fetch): share response state across workers and caches 2026-11-12 16:31:24 +08:00
ldm0 908569707f fix(csp): retain Document policy when opening an input stream
Source-commit: 29cb9a6739
2026-11-12 16:18:35 +08:00
ldm0 c728bb28c9 fix(window): validate scheduling method receivers
Source-commit: 3c207eeef1
2026-11-12 16:13:01 +08:00
ldm0 05ea642be9 fix(pdf): deduplicate link regions independently of paint order 2026-11-12 16:02:40 +08:00
ldm0 69602b1c63 fix(layout): paint glyphless inline selection ranges 2026-11-12 16:02:40 +08:00
ldm0 d1a4267185 refactor(csp): borrow self-origin fallbacks during URL checks
Keep captured policy origins ahead of native-origin and Document URL
fallbacks without cloning and mutating a shared parsed policy for each
check. Reuse the same connect check entry point for the top Document.

Cover fallback priority, per-check isolation, and report attribution and
relative endpoint resolution for both policy dispositions.
2026-11-12 16:00:07 +08:00
ldm0 6ba7bc855f refactor(frames): reuse native owner lookup for inherited settings
Resolve iframe creators through owner_dispatch_scope_for_node for initial
policy inheritance, CSP parent lookup, and inherited secure-context checks.
Preserve the existing initial-policy fallback during auxiliary-page
handoff and popup retirement, when dispatch mappings can be unavailable.

Pass DocumentPolicyContainer directly into connect CSP checks.
2026-11-12 16:00:07 +08:00
ldm0 6786667081 test(fetch): cover Body completion tasks in child-opened popups
Source-commit: 137a8e3859
2026-11-12 14:58:34 +08:00
ldm0 f935014934 fix(fetch): preserve author header spelling through native dispatch
Preserve the first accepted header spelling through Header mutations, Request copies and network serialization while keeping public iteration lowercase and case-insensitive lookup. Include twelve real HTTP request cases in both Window and Worker.

Extracted from development commit 55e94176e33e801bb4ca96fe805c3771d153d577.
Base: main (b30f39c580).

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 147.813s] 22171 tests run: 22171 passed (9 slow), 20 skipped
2026-11-12 14:41:29 +08:00
ldm0 cbf4d0149f fix(layout): paint mixed inline carets without glyph runs 2026-11-12 04:42:48 +08:00
ldm0 aa24f3aebc fix(modules): bind import.meta resolution to Window settings
Extracted from development commit 7f7d222c41.

Adapted to the target branch APIs. Validated with cargo fmt --all, full workspace Clippy (-D warnings), and cargo nextest run --no-fail-fast before committing.
2026-11-12 04:21:50 +08:00
ldm0 70630546bd fix(frames): inherit popup child origin and policy from creator
Resolve the creator from the iframe element's owning Document and read that
Document's committed native origin. This includes popup roots and inherited
about documents, rather than falling back to the host page URL. Use the same
creator origin for initial-empty initialization and navigation commit inputs.
Initial empty policy containers also inherit from the owning popup, rather
than the host page. Window.open takes creator policy from its already selected
opener Window, keeping policy and native origin inheritance aligned.

Capture real TLS WebSocket handshake headers from cross-origin popup child
frames for both constructors, initial about:blank and committed srcdoc,
direct and nested frames, and sandboxed srcdoc with Origin: null. Contrast
host connect-src none with popup connect-src self to protect policy inheritance.
2026-11-12 04:17:04 +08:00
ldm0 a053465768 fix(csp): preserve report destinations across document inheritance
Resolve relative report-uri endpoints against the full response URL at policy
delivery, and retain them with the policy across popup and srcdoc inheritance.
Keep the actual Document URL in connect checks and supply native origin only
as a self-matching fallback for unbound local policies.

Reuse the existing owner policy snapshot for child and popup checks. Capture
actual report POST paths for both WebSocket constructors, cover policy clones
and report-only disposition, and preserve local popup meta CSP matching.
2026-11-12 04:17:04 +08:00
ldm0 31d3c9e607 fix(csp): preserve policy self-origin across opaque document inheritance
Capture response policy self-origins at delivery and use them independently
of the protected document URL for source-list checks. Inherited policies
retain this identity when sandboxing makes the request origin opaque.

Use effective inherited connect policies for child documents and resolve
their popup owner before falling back to the host document. Cover real TLS
handshakes with Origin: null, base changes, popup ownership, and blocked
foreign targets with CSP violation events and no network request.
2026-11-12 04:17:04 +08:00
ldm0 977de8422b fix(websockets): inherit empty iframe security from popup owners
Follow inherited child documents through their actual frame parents and
stop at a lightweight popup's saved native security state. This prevents
the unrelated host page from disabling or adding mixed-content checks.

Cover both trust directions, about:blank and srcdoc documents, and nested
frames using WebSocket constructors executed in the inner frame itself.
2026-11-12 04:17:04 +08:00
ldm0 dc8fc60a81 fix(websocket): separate popup security identity from API base URLs
Keep live URL resolution separate from native document attribution, origin,
cookie context and mixed-content state for Window WebSocket constructors.
Preserve inherited popup CSP self matching and share the existing API-base
selector with Service Worker registration lookups.

Cover real WSS handshake Origin and SameSite cookies, popup mixed-content
checks and relative URL resolution after argument conversion.
2026-11-12 04:17:04 +08:00
ldm0 9b6fb793d4 fix(service-workers): resolve Window registration lookups from native settings
Resolve getRegistration URLs using the receiver Window's current API base URL and validate them against its native origin. Reuse the source branch's shared registration URL helpers; retain the dynamic-base, borrowed-method, inherited iframe, popup and srcdoc regression coverage.

Source-commit: bfee69b3f1
2026-11-12 04:17:04 +08:00
ldm0 b20ff14ff9 refactor(inspector): derive response IDs and make parsing explicit 2026-11-12 03:32:12 +08:00