Commit Graph
36 Commits
Author SHA1 Message Date
ldm0 071e553e5b refactor(dom): name atomic move semantics consistently 2026-11-13 02:01:36 +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 dc84a7ffab refactor(renderer): clarify script host and shared isolate names 2026-11-13 00:29:11 +08:00
ldm0 a9517f0fee fix(stylesheets): preserve request policy during import graph loading
Prepare linked and inline requests at parser admission, then read the current
delivered Document policy for each newly discovered import. Each request keeps
its own policy through redirects, so later meta policies constrain new imports
without retroactively rejecting requests that were already admitted.

Reuse the existing meta policy registry and import collector. Register the
request and final URL of every completed sheet before expanding its imports,
and skip graph installation and repeated CSSOM refresh for links without
imports.

Cover dynamic and parser-delivered meta policies, same- and cross-origin
roots, inline imports, blocked data imports, and nested redirect cycles.
2026-11-09 13:08:51 +08:00
ldm0 e057516b42 fix(stylesheets): enforce child import policy and cycle identity
Retain the original root resource URL alongside the response parser base when
installing live import graphs, so a redirected link cannot import its root
response again through the original URL.

Capture the exact child Document's CSP for parser stylesheet graphs. Check
network and data imports before loading, apply policy to redirect targets, and
validate cached or Service Worker redirect chains for the current consumer.
Queue violations through the existing exact-Document Page task path and target
the child Document. Refused imports still settle parser and load blockers.

Use inherited native origins for local Documents' CSP self checks, independently
of their live base URL. Cover redirected cycles, linked and inline import graphs,
enforced/meta/report-only policies, redirect targets, data imports and srcdoc.
2026-11-09 13:08:51 +08:00
ldm0 7b377340d9 fix(stylesheets): finish child linked import graphs before parser scripts 2026-11-09 13:08:51 +08:00
ldm0 0b75b9e98d perf(renderer): defer realms for native lifecycle and inline events 2026-11-06 00:05:30 +08:00
ldm0 eac226d361 fix(stylesheets): evaluate parser media in the owning document 2026-11-03 07:53:58 +08:00
ldm0 b2fc3dd65c fix(html): preserve child meta refresh with shared scheduling
Process parser and script-created refresh declarations in order and retain them
on their owning Document across load callbacks and adoption. Share candidate
priority and deadline state between main and child documents, and arm child
timers after owner load completes.

Consume queued work by exact Document identity and revision, classify navigation
when it fires, and keep the registered target URL. Reprocess same-value meta
attributes using the matched Attr identity so XML case, namespaces, observer
records, and refresh deadlines remain correct.

Cover competing declarations, stale tasks, independent frames, load/adoption
boundaries, sandbox/shadow handling, saved targets, and fragment navigation.
2026-10-26 03:17:22 +08:00
ldm0 f660ee584f refactor(csp): extract shared policy engine into moli-csp 2026-10-21 22:15:00 +08:00
ldm0 29393a6cfb fix(dom): retain encodings in native Document state 2026-10-21 16:41:12 +08:00
ldm0 e3538c8999 fix(stylesheets): honor quirks mode MIME compatibility 2026-10-12 17:17:55 +08:00
ldm0 0d3d81829c fix(selectors): honor native document design mode 2026-09-27 18:38:08 +08:00
ldm0 791c4c1dc5 fix(sandbox): preserve active document navigation permissions
Store top-navigation permission in the existing DocumentSandboxPolicy and
combine iframe and response CSP restrictions. Read the committed policy
when checking navigation instead of the live iframe sandbox attribute.

Cover adding and removing restrictions after load, applying them on the
next navigation, and combining iframe and CSP permissions.
2026-09-26 19:54:57 +08:00
ldm0 929f73b148 fix(events): keep shared event state in private V8 backing 2026-09-26 01:38:23 +08:00
ldm0 cd0c82e5ba refactor(renderer): centralize pending parser blocking work
Keep main-driver and document.write blockers in one Document-owned slot.
Claim pending work before executing JavaScript so reentrant writes can
install a successor without cleanup from the outer execution removing it.

Use one readiness gate for inserted-source and stylesheet completion, carry
continuations behind new blockers, and discard retired document or driver
work. Cover both resource completion orders, nested writes and main-resource
failure.
2026-09-24 19:22:52 +08:00
ldm0 d3b336740c refactor(renderer): record parser suspension resume ownership
Keep the continuation owner in each parser suspension, so scheduler routing
does not infer it from document.write pending work. Require matching
ownership when consuming resume permits and cover both stylesheet paths
with regression tests.
2026-09-24 19:22:52 +08:00
ldm0 3dcfac5278 fix(parser): preserve reentrant insertion state and reaction order
Flush parser insertion reactions after the tree builder completes its current
token so connected callbacks run before children without retaining parser
borrows across JavaScript execution.

Keep one DocumentParserSession and expose a restricted insertion handle for
nested writes. Share input, suspension, cancellation, and close state so
blocked writes remain queued and outer feeds stop when nested parsing blocks
or replaces the document. Let the owning session finish deferred close and
dispatch readiness transitions once.

Reuse form-owner mutation detection for child parser insertions and add
regressions for reaction order, form association, nested writes, gated external
scripts, document replacement, and deferred close.

Validation: cargo fmt --all; strict workspace Clippy; cargo nextest run
--no-fail-fast (18,104 passed, 13 existing skips); release build.
2026-09-16 21:16:07 +08:00
ldm0 c0a87c6960 fix(fetch): preserve committed origins for document subresources 2026-09-14 06:48:28 +08:00
ldm0 ff384a8126 feat(gamepad): expose policy-aware empty gamepad enumeration 2026-09-09 04:05:39 +08:00
ldm0 0fb89bcd31 fix(sandbox): block disallowed JavaScript dialogs 2026-09-08 14:01:05 +08:00
ldm0 2cba5a7aeb feat(fetch): add disable-css mode 2026-09-04 03:46:02 +08:00
ldm0 17a288b3db refactor(csp): unify navigation embedding checks 2026-08-26 20:39:31 +08:00
ldm0 d96feb74f2 refactor(document): unify navigation response policies 2026-08-26 20:39:31 +08:00
ldm0 28aaaa9e8a feat(cli): add disable-js fetch mode 2026-08-25 16:05:34 +08:00
ldm0 3d6f263e28 refactor(renderer): make parser finish boundaries explicit 2026-08-24 15:39:23 +08:00
ldm0 7cf5dfbb34 fix(renderer): isolate stale import completions 2026-08-23 04:45:50 +08:00
ldm0 8e6dd03abc fix(renderer): settle shared stylesheet clients per owner
Keep physical stylesheet fetches and import graph work shared while installing CSSOM state and terminal events for every link owner. Settle completed clients at admission, retain completed import graphs for late owners, and validate document ownership before asynchronous installation.

This replaces the abandoned turn-exit replay path with an explicit shared-fetch/per-owner lifecycle model and adds coverage for document.write(), data URLs, imports, failures, node mutation, and document replacement.
2026-08-23 04:45:50 +08:00
ldm0 8d82acf953 fix(renderer): keep modulepreload from delaying load
Use a synchronous prepare/commit/apply boundary for connected stylesheet lifecycle authority, so DocumentRuntime no longer acquires it through raw ContextHost pointers. Keep modulepreload network fetches identity-only and publish terminal link events without a Document load-delay lease.
2026-08-22 02:08:32 +08:00
ldm0 9925bb12f3 refactor(renderer): identify document runtime incarnations exactly 2026-08-21 11:23:44 +08:00
ldm0 9e04a203d7 refactor(renderer): bind prepared scripts to exact document owners 2026-08-21 11:23:44 +08:00
ldm0 763ba96d6e refactor(renderer): store document input stream state directly 2026-08-18 02:26:17 +08:00
ldm0 8cd6dac0d4 fix(devtools): keep non-V8 IO agents owner-independent 2026-08-17 00:40:39 +08:00
ldm0 47bfa5aa78 refactor(parser): simplify resume identity 2026-08-13 07:07:00 +08:00
ldm0 f2a2095751 fix(navigation): stabilize sequential CDP lifecycle 2026-08-13 07:07:00 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00