Closed Bug 1909591 Opened 3 months ago Closed 3 months ago

[wpt-sync] Sync PR 47269 - Input event data should not be null when replace selection command is performed

Categories

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

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Utkarsh Pathak <utpathak@microsoft.com> wrote:

Input event data should not be null when replace selection command is performed

As per spec
https://www.w3.org/TR/input-events-1/#overview, event data for input
events with certain inputType should be set with the data under
operation. Currently, the event data is null since the method
|TextDataForInputEvent| was not implemented in |ReplaceSelectionCommand|
class, which is implemented in this CL. |ReplaceSelectionCommand|
objects are populated with insertFromDrop, insertFromPaste,
insertReplacementText, insertTranspose and none inputType. This change
will set the data for input events with inputType insertFromDrop,
insertFromPaste and insertReplacementText leaving the insertTranspose
and none inputType data null as per the spec. For other input types,
other class objects derived from |EditCommand| are created, which is not
in the scope of this CL and can be handled separately.

Bug: 40737336
Change-Id: Ia7557f4d4fb239585be8fbcc5cdb489b77799c3f
Reviewed-on: https://chromium-review.googlesource.com/5605567
WPT-Export-Revision: 87274364c45ee15c0252394d96496ad9c79942f0

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 2 tests and 1 subtests

Status Summary

Firefox

OK : 2
FAIL: 2

Chrome

OK : 2
FAIL: 2

Safari

OK : 2
FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fbf109d948b4 [wpt PR 47269] - Input event data should not be null when replace selection command is performed, a=testonly https://hg.mozilla.org/integration/autoland/rev/4ca04bae7cea [wpt PR 47269] - Update wpt metadata, a=testonly
You need to log in before you can comment on or make changes to this bug.