Closed Bug 1862110 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42818 - [EditContext] Don't populate getTargetRanges for deletions

Categories

(Core :: DOM: Editor, task, P4)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dan Clark <daniec@microsoft.com> wrote:

[EditContext] Don't populate getTargetRanges for deletions

In [1] the issue was raised that getTargetRanges() in beforeinput
is not interoperable across browsers for deletions. We don't want to
include non-interoperable behaviors in EditContext, so return an empty
array for getTargetRanges() when beforeinput is received for deletions
in EditContext.

We may revisit this later on and start providing a range if
interoperable behavior can be designed.

[1] https://github.com/w3c/input-events/issues/146

Bug: 999184
Change-Id: Iac697f89a7c7ecee57c850e7b929e42670c10e32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4985470
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Dan Clark \<daniec@microsoft.com>
Reviewed-by: Anupam Snigdha \<snianu@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1217018}

Component: web-platform-tests → DOM: Editor
Product: Testing → Core

CI Results

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

Total 1 tests and 5 subtests

Status Summary

Firefox

OK : 1
FAIL: 5

Chrome

OK : 1
PASS: 3
FAIL: 2

Safari

OK : 1
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /editing/edit-context/edit-context-input.tentative.html [wpt.fyi]
    • Testing EditContext English typing: FAIL (Chrome: PASS, Safari: FAIL)
    • EditContext should disable DOM mutation: FAIL (Chrome: PASS, Safari: FAIL)
    • beforeInput(insertText) should be cancelable: FAIL (Chrome: PASS, Safari: FAIL)
    • EditContext should not receive events after being detached from element: FAIL (Chrome: FAIL, Safari: FAIL)
    • Backspace and delete in EditContext: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e584836b1a35 [wpt PR 42818] - [EditContext] Don't populate getTargetRanges for deletions, a=testonly https://hg.mozilla.org/integration/autoland/rev/cb5584966d19 [wpt PR 42818] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea631482f94e [wpt PR 42818] - [EditContext] Don't populate getTargetRanges for deletions, a=testonly https://hg.mozilla.org/integration/autoland/rev/5d6b759cbcfb [wpt PR 42818] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.