Closed Bug 2018359 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 57954 - Add OpaqueRange disconnect() method

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 57954 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/57954
Details from upstream follow.

Stephanie Zhang <stephanie.zhang@microsoft.com> wrote:

Add OpaqueRange disconnect() method

Implement disconnect() per WHATWG DOM spec PR #1404 [0]. Detaches the
range from its element, stopping live offset updates and zeroing
offsets. Calling it multiple times is safe and has no additional effect.

Adds WPT tests covering disconnect behavior.

Automatic disconnection when the element is removed from the tree or
changes type will be handled in a follow-up CL.

[0] https://github.com/whatwg/dom/pull/1404#discussion_r2794334771

Low-Coverage-Reason: COVERAGE_UNDERREPORTED
Bug: 421421332
Change-Id: I6f0bb55d57f1eb1876779faad018a19d23b1d665
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7595177
Reviewed-by: Dan Clark \<daniec@microsoft.com>
Commit-Queue: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Reviewed-by: Ana Sollano Kim \<ansollan@microsoft.com>
Reviewed-by: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1588113}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 15 tests and 5 subtests

Status Summary

Firefox

OK : 1[GitHub] 15[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PASS: 1
FAIL: 5[GitHub] 134[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

OK : 1
FAIL: 5

Safari

OK : 1
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /dom/ranges/tentative/FormControlRange-basic.html [wpt.fyi]
    • Tests FormControlRange constructor and inheritance.: FAIL
    • Tests FormControlRange default values when no form control is set.: FAIL
    • FormControlRange handles empty value correctly.: FAIL
  • /dom/ranges/tentative/FormControlRange-geometry-basic.html [wpt.fyi]
    • Collapsed caret geometry (input): FAIL
    • Simple selection geometry (input): FAIL
    • Geometry empty after control removal (input): FAIL
    • Collapsed caret at start/middle/end (input): FAIL
    • Full selection bounding box inside element (input): FAIL
    • Backwards offsets collapse (input): FAIL
    • display:none empty geometry (input): FAIL
    • Collapsed caret geometry (textarea): FAIL
    • Simple selection geometry (textarea): FAIL
    • Geometry empty after control removal (textarea): FAIL
    • Collapsed caret at start/middle/end (textarea): FAIL
    • Full selection bounding box inside element (textarea): FAIL
    • Backwards offsets collapse (textarea): FAIL
    • display:none empty geometry (textarea): FAIL
  • /dom/ranges/tentative/FormControlRange-geometry-complexity-and-visibility.html [wpt.fyi]
    • Bidirectional mixed text full selection geometry (input): FAIL
    • Surrogate pair width normalization invariants (input): FAIL
    • visibility:hidden caret geometry (input): FAIL
    • Bidirectional mixed text full selection geometry (textarea): FAIL
    • Surrogate pair width normalization invariants (textarea): FAIL
    • visibility:hidden caret geometry (textarea): FAIL
  • /dom/ranges/tentative/FormControlRange-geometry-multiline-and-mutations.html [wpt.fyi]
    • Partial hard-newline selection (textarea): FAIL
    • Selection spanning blank line (textarea): FAIL
    • Soft-wrapped long single line (textarea): FAIL
    • Collapsed caret across newline parity (textarea): FAIL
    • Input live insertion/deletion adjustments: FAIL
    • Textarea interior deletion & insertion adjustments: FAIL
    • Insertion inside expands width (input): FAIL
    • Deletion collapses geometry (input): FAIL
    • Shrink/grow end offset clamping (input): FAIL
    • Tail deletion clamps end offset (input): FAIL
    • Insertion inside expands width (textarea): FAIL
    • Deletion collapses geometry (textarea): FAIL
    • Shrink/grow end offset clamping (textarea): FAIL
    • Tail deletion clamps end offset (textarea): FAIL
    • Deletion collapses selection (input explicit): FAIL
  • /dom/ranges/tentative/FormControlRange-interactive-basic.html [wpt.fyi]
    • Insertion: at start boundary keeps start; end extends (multi-char) (input).: FAIL
    • Insertion: inside range extends end by length (input).: FAIL
    • Insertion: at end boundary leaves offsets unchanged (multi-char) (input).: FAIL
    • Equal-length replacement: single char inside range (input).: FAIL
    • Deletion: backspace before range shifts both left (input).: FAIL
    • Deletion: forward delete inside range contracts end by 1 (input).: FAIL
    • Deletion: forward delete at end boundary no effect on range (input).: FAIL
    • Deletion: backspace at control start is no-op (input).: FAIL
    • Insertion: at start boundary keeps start; end extends (multi-char) (textarea).: FAIL
    • Insertion: inside range extends end by length (textarea).: FAIL
    • Insertion: at end boundary leaves offsets unchanged (multi-char) (textarea).: FAIL
    • Equal-length replacement: single char inside range (textarea).: FAIL
    • Deletion: backspace before range shifts both left (textarea).: FAIL
    • Deletion: forward delete inside range contracts end by 1 (textarea).: FAIL
    • Deletion: forward delete at end boundary no effect on range (textarea).: FAIL
    • Deletion: backspace at control start is no-op (textarea).: FAIL
  • /dom/ranges/tentative/FormControlRange-interactive-overlap-and-selection.html [wpt.fyi]
    • Overlap: partial overlap at start (delete selection) (input).: FAIL
    • Overlap: partial overlap at end (delete selection) (input).: FAIL
    • Selection deletion: delete selection exactly equal to range (collapse) (input).: FAIL
    • Selection deletion: delete subset inside range (contract end) (input).: FAIL
    • Boundary forward delete shifts range left (input).: FAIL
    • Overlap: partial overlap at start (delete selection) (textarea).: FAIL
    • Overlap: partial overlap at end (delete selection) (textarea).: FAIL
    • Selection deletion: delete selection exactly equal to range (collapse) (textarea).: FAIL
    • Selection deletion: delete subset inside range (contract end) (textarea).: FAIL
    • Boundary forward delete shifts range left (textarea).: FAIL
  • /dom/ranges/tentative/FormControlRange-offset.html [wpt.fyi]
    • FormControlRange with single character in textarea.: FAIL
    • FormControlRange with empty control in textarea.: FAIL
    • FormControlRange boundary positions in textarea.: FAIL
    • FormControlRange with Unicode characters in textarea.: FAIL
    • FormControlRange with single character in input.: FAIL
    • FormControlRange with empty control in input.: FAIL
    • FormControlRange boundary positions in input.: FAIL
    • FormControlRange with Unicode characters in input.: FAIL
    • FormControlRange preserves whitespace in textarea light DOM.: FAIL
    • FormControlRange should work correctly with weirdly formed light DOM structure.: FAIL
    • FormControlRange ignores malformed input child nodes.: FAIL
  • /dom/ranges/tentative/FormControlRange-programmatic-updates.html [wpt.fyi]
    • Full replace collapses to start (shorter & longer) (input): FAIL
    • Full replace from whole-old range collapses to 0 (input): FAIL
    • Full replace (equal length) collapses to 0 (input): FAIL
    • Partial replacement adjusts end (input): FAIL
    • No-op leaves range unchanged (input): FAIL
    • Insertion before range shifts both endpoints (input): FAIL
    • Interior deletion shrinks end (input): FAIL
    • Before-range shrink shifts left (input): FAIL
    • After-range grow leaves range unchanged (input): FAIL
    • Superset replacement collapses to change start (input): FAIL
    • Insert at range.start extends end (input): FAIL
    • Insert at range.end leaves range unchanged (input): FAIL
    • Surrogate pair expansion grows end (input): FAIL
    • Chained interior edits cumulatively adjust range (input): FAIL
    • Full replace collapses to start (shorter & longer) (textarea): FAIL
    • Full replace from whole-old range collapses to 0 (textarea): FAIL
    • Full replace (equal length) collapses to 0 (textarea): FAIL
    • Partial replacement adjusts end (textarea): FAIL
    • No-op leaves range unchanged (textarea): FAIL
    • Insertion before range shifts both endpoints (textarea): FAIL
    • Interior deletion shrinks end (textarea): FAIL
    • Before-range shrink shifts left (textarea): FAIL
    • After-range grow leaves range unchanged (textarea): FAIL
    • Superset replacement collapses to change start (textarea): FAIL
    • Insert at range.start extends end (textarea): FAIL
    • Insert at range.end leaves range unchanged (textarea): FAIL
    • Surrogate pair expansion grows end (textarea): FAIL
    • Chained interior edits cumulatively adjust range (textarea): FAIL
  • /dom/ranges/tentative/FormControlRange-range-updates.html [wpt.fyi]
    • FormControlRange allows updating range on same element.: FAIL
    • FormControlRange can switch between different form controls.: FAIL
    • FormControlRange works with disconnected and then connected form controls.: FAIL
    • FormControlRange can switch between connected and disconnected form controls.: FAIL
    • FormControlRange collapses on full .value= replacement.: FAIL
  • /dom/ranges/tentative/FormControlRange-supported-elements.html [wpt.fyi]
    • FormControlRange should support textarea.: FAIL
    • FormControlRange should support input[type=text].: FAIL
    • FormControlRange should support input[type=search].: FAIL
    • FormControlRange should support input[type=password].: FAIL
    • FormControlRange should support input[type=url].: FAIL
    • FormControlRange should support input[type=tel].: FAIL
  • /dom/ranges/tentative/FormControlRange-toString.html [wpt.fyi]
    • FormControlRange collapses on full .value= replacement.: FAIL
    • FormControlRange collapses on full .value= replacement (shorter).: FAIL
    • FormControlRange toString() handles value shorter than range.: FAIL
    • FormControlRange toString() handles auto-collapsed backwards ranges.: FAIL
    • FormControlRange uses current input.value, not value attribute.: FAIL
  • /dom/ranges/tentative/FormControlRange-unsupported-elements.html [wpt.fyi]
    • FormControlRange throws NotSupportedError for text node.: FAIL
    • FormControlRange should throw NotSupportedError for all unsupported HTML5 elements.: FAIL
    • FormControlRange should throw NotSupportedError for unsupported input types.: FAIL
    • NotSupportedError should take precedence over IndexSizeError when both element type and index are invalid for a FormControlRange.: FAIL
  • /dom/ranges/tentative/FormControlRange-update-event-order.html [wpt.fyi]
    • Event order: FormControlRange updates between beforeinput and input (input).: FAIL
    • Canceled beforeinput leaves FormControlRange unchanged (input).: FAIL
    • Event order: FormControlRange updates between beforeinput and input (textarea).: FAIL
    • Canceled beforeinput leaves FormControlRange unchanged (textarea).: FAIL
  • /dom/ranges/tentative/FormControlRange-validation.html [wpt.fyi]
    • FormControlRange preserves state when setFormControlRange throws.: FAIL
    • FormControlRange handles all range types correctly: forward, backwards, and out-of-bounds.: FAIL
  • /dom/ranges/tentative/OpaqueRange-disconnect.html [wpt.fyi]
    • disconnect() resets range state and geometry.: FAIL (Chrome: FAIL, Safari: FAIL)
    • disconnect() is idempotent.: FAIL (Chrome: FAIL, Safari: FAIL)
    • disconnect() stops live offset updates.: FAIL (Chrome: FAIL, Safari: FAIL)
    • disconnect() only affects the target range.: FAIL (Chrome: FAIL, Safari: FAIL)
    • Element accepts new ranges after a prior range is disconnected.: FAIL (Chrome: FAIL, Safari: FAIL)
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.