Commit Graph
37 Commits
Author SHA1 Message Date
ldm0 be5cd0e997 fix(parser): adapt WPT paths to shared parser state
Preserve owner interruptions during deferred script preparation and use the
current HTML stream and custom-element construction interfaces. Restore
body/window content-handler registration on the new child insertion path and
remove mutation adapters superseded by the shared parser lifecycle.

Validation: cargo fmt --all; strict all-feature workspace Clippy; cargo nextest
run --no-fail-fast (19,128 passed, 13 skipped). The nine child handler regressions
also pass in a focused run.
2026-09-23 09:12:25 +08:00
ldm0 38b23a0e52 fix(style): process parser styles after their children finish 2026-09-23 09:04:55 +08:00
ldm0 1d7f00372f fix(parser): checkpoint microtasks before preparing parser scripts
Yield live HTML script preparation to the document owner after releasing
parser borrows. Prepare from the current DOM after the guarded microtask
checkpoint, and abandon stale handoffs when that checkpoint replaces the
document. Apply the boundary to main documents, child documents, and
document.write; preserve eager parsing when no runtime owner is installed.

Admit parser async classic scripts after preparation and keep nested
script cleanup from draining microtasks while an outer script is running.
Add main/child integration coverage and update the two repaired WPT cases.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,846 passed, 13 skipped
- 245 related WPT cases: all 231 previously passing cases remain passing
- Final CLI build: both repaired WPT cases pass on the validated sources
2026-09-23 08:56:05 +08:00
ldm0 ee650b535a fix(scripts): queue parser preparation error events
Distinguish empty or invalid external script URLs from internal parser preparation failures. Queue trusted element errors on the shared DOM-manipulation source for root, document.write, and child parser paths without reporting spurious Window exceptions.

Retain exact Document ownership, listener checkpoints, and already-started state. Cover stale tasks and reused PageVm-local ids, and record the two WPT cases verified in CLI and CDP modes.
2026-09-23 08:56:05 +08:00
ldm0 02af0c47be fix(script): mute cross-origin classic script errors 2026-09-23 08:55:45 +08:00
ldm0 b64abac840 fix(xml): expand internal subset entities in DOMParser 2026-09-23 08:54:59 +08:00
ldm0 7019c638bd fix(forms): block submission for unclosed controls 2026-09-23 08:54:59 +08:00
ldm0 a3fb999011 fix(parser): route XHTML template children to content 2026-09-23 08:54:59 +08:00
ldm0 8905fe0860 fix(stylesheets): honor quirks MIME compatibility 2026-09-23 08:54:59 +08:00
ldm0 65c587d0fd fix(domparser): discard trees recovered after prologue errors 2026-09-23 08:53:57 +08:00
ldm0 b9d2a495ef fix(html): preserve document scripting mode 2026-09-23 08:53:16 +08:00
ldm0 dfd3fe7569 fix(domparser): preserve HTML parse modes 2026-09-23 08:52:45 +08:00
ldm0 42f3425a60 fix(csp): reject nonnonceable script elements 2026-09-23 08:52:24 +08:00
ldm0 c8c70abdd0 fix(forms): synchronize selectedcontent clones 2026-09-23 08:50:55 +08:00
ldm0 34ea9e23b7 fix(parser): support customizable select content 2026-09-23 08:50:55 +08:00
ldm0 329f7cf10b fix(parser): preserve strict XML tokenizer errors 2026-09-23 08:46:42 +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
ldm0 f645752894 fix(parser): notify mutations when coalescing text
Return text mutation effects from parser sinks and deliver them through the shared notification pipeline after releasing the structural borrow. This keeps stylesheets and layout current when parser input is merged into existing text nodes, and delivers characterData records without replacing node identity.

Add main-document and iframe regressions for split stylesheet input, hit testing, and MutationObserver delivery. Restore the verified elementsFromPoint iframe WPT to the passed list.
2026-09-17 14:17:33 +08:00
ldm0 4f7c4ffc0b refactor(parser): share mutation effects and isolate tokenizer pauses
Share parser mutation notifications between the main document and child
frames, with each owner retaining its resource and lifecycle work. Update
stylesheet owners incrementally so parser mutations preserve CSSOM edits.
Keep tokenizer pause reasons separate from DOM handle identity.

Add main/iframe regressions for reaction and observer ordering, form
association, stylesheet visibility, CSSOM edits, and nested frame identity.

Validation: cargo fmt --all; strict workspace clippy; cargo nextest run
--no-fail-fast (18,118 passed, 13 skipped).
2026-09-17 01:11:29 +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 38b162da58 test(parser): cover customizable select wrapper parsing 2026-09-14 00:35:20 +08:00
ldm0 416936f732 fix(modules): enforce import-map integrity
Source-commit: 259f7aaa46
2026-09-12 06:40:39 +08:00
ldm0 e3f8765a34 fix(parser): treat empty HTML4 system IDs as quirks
Source-commit: 7f2172a42f
2026-09-11 00:31:21 +08:00
ldm0 5d99eb4ce8 fix(import-maps): enforce parser inline CSP
Source-commit: 7ddb9b78ed
2026-09-10 14:49:41 +08:00
ldm0 e666504594 refactor(parser): remove obsolete fragment APIs 2026-09-01 04:31:16 +08:00
ldm0 9953237e66 perf(parser): build fragments directly in live DOM 2026-09-01 04:31:16 +08:00
ldm0 28aaaa9e8a feat(cli): add disable-js fetch mode 2026-08-25 16:05:34 +08:00
ldm0 9e04a203d7 refactor(renderer): bind prepared scripts to exact document owners 2026-08-21 11:23:44 +08:00
ldm0 a142d011c0 refactor: extract HTML parser input stack 2026-08-20 23:39:45 +08:00
ldm0 a46043736e fix: preserve nested parser input order 2026-08-20 22:17:23 +08:00
ldm0 0d1b885eb0 build(deps): align html parser stack on 0.39 2026-08-17 01:26:26 +08:00
ldm0 d51be5bfc4 chore: fix clippy and document required checks 2026-08-13 07:07:00 +08:00
ldm0 3600404225 perf(parser): keep XML namespaces in token stream 2026-08-13 07:07:00 +08:00
ldm0 91c281d2c7 fix(parser): expose CDATA from xml5ever 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