Skip to content

fix(dom): convert Range arguments through native WebIDL brands - #1863

Open
ldm0 wants to merge 1 commit into
wpt/20261022-range-native-receiversfrom
wpt/20261022-range-webidl-node-arguments
Open

ldm0 wants to merge 1 commit into
wpt/20261022-range-native-receiversfrom
wpt/20261022-range-webidl-node-arguments

Conversation

@ldm0

@ldm0 ldm0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Range operations currently validate and recover Node arguments separately in individual callbacks. Convert them through shared WebIDL argument declarations and native interface brands before range algorithms run. StaticRange initialization uses the same typed node/offset conversion path.

Read node types, parents, UTF-16 lengths and boundary ordering from native Node references instead of author-visible nodeType/parentNode/data properties. Registered native aliases resolve to the same backing identity.

Regression coverage checks required arguments, conversion order, original exceptions, cross-realm errors, author property overrides and genuine versus forged/proxy node values.

For example, isPointInRange({}, 0) now raises the binding TypeError instead of returning false for an invalid Node argument.

Includes the small shared native Node reference identity core consumed by these algorithms, with explicit tree/Attr/Range and registered-alias checks in the existing proxy matrix.

Depends on #1862.

Validation on base 859c6c259dd8: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. All passed (20,533 passed, 18 existing skips; 32 build jobs and test threads, no automatic retries). Focused regressions also passed.

@ldm0
ldm0 added this pull request to stack #1874 October 22, 2026 06:31
@ldm0
ldm0 force-pushed the wpt/20261022-range-webidl-node-arguments branch from e5da120 to a195f10 Compare October 22, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant