Closed Bug 2018316 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 57945 - script: Implement focus support for contenteditable elements

Categories

(Core :: DOM: Selection, 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 57945 into mozilla-central (this bug is closed when the sync is complete).

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

Tim van der Lippe <tvanderlippe@gmail.com> wrote:

script: Implement focus support for contenteditable elements

There is no specification for this, but there are relevant
WPT tests in selection/contenteditable. This PR implements
the required changes to make sure that when such an element
is focused (programmatically), it selects the correct node.

The implementation is therefore entirely reverse-engineered
based on existing browser behavior and commented to hopefully
make it make sense.

It also moves some methods to Text/Node since now we need
them not just for execCommand.

Part of #<!-- nolink -->7492
Part of #<!-- nolink -->12776
Reviewed in servo/servo#42734

Component: web-platform-tests → DOM: Selection
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 2 tests and 51 subtests

Status Summary

Firefox

OK : 2
PASS: 151

Chrome

OK : 2
PASS: 147
FAIL: 4

Safari

OK : 2
PASS: 143
FAIL: 8

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9aae700f3b23 https://hg.mozilla.org/integration/autoland/rev/b5a5d72c2dd4 [wpt PR 57945] - script: Implement focus support for contenteditable elements, a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.