Skip to content

[selection api] Rewrite Selection-getComposedRanges-range-update.html #51561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

This change reformat the tentative test
Selection-getComposedRanges-range-update.html to match the spec
at whatwg/dom#1342:

  1. If selection is across different roots, getRangeAt(0) should throw
    INDEX_SIZE_ERR.
  2. If a live range sets its end/start to a disconnected node, the live
    range and the selection are both collapsed.
  3. If a live range sets its end/start to cross a shadow boundary such
    that the range has start before end, collapse the live range,
    but not the composed selection range.
  4. If a live range sets its end/start to cross a shadow boundary such
    that the range has start after end, collapse both the live range
    and the composed selection range.

We also clean up the other range API tests: selectNode(), collapse,
createRange(), addRange().

Change-Id: I03f9309be67b21a781c47d555732a3480322097b
Bug: 40286116
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6383722
Reviewed-by: Dominic Farolino <[email protected]>
Commit-Queue: Di Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1437019}

This change reformat the tentative test
Selection-getComposedRanges-range-update.html to match the spec
at whatwg/dom#1342:
1. If selection is across different roots, getRangeAt(0) should throw
   INDEX_SIZE_ERR.
2. If a live range sets its end/start to a disconnected node, the live
   range and the selection are both collapsed.
3. If a live range sets its end/start to cross a shadow boundary such
   that the range has start before end, collapse the live range,
   but not the composed selection range.
4. If a live range sets its end/start to cross a shadow boundary such
   that the range has start after end, collapse both the live range
   and the composed selection range.

We also clean up the other range API tests: selectNode(), collapse,
createRange(), addRange().

Change-Id: I03f9309be67b21a781c47d555732a3480322097b
Bug: 40286116
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6383722
Reviewed-by: Dominic Farolino <[email protected]>
Commit-Queue: Di Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1437019}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit a83a40d into master Mar 24, 2025
9 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-1e8d9999fc branch March 24, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants