Closed Bug 2073729 Opened 2 months ago Closed 1 month ago

[wpt-sync] Sync PR 62777 - script: Fix writing to hidden text control elements

Categories

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

task

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Diego Frias <mail@dzfrias.dev> wrote:

script: Fix writing to hidden text control elements

There was previously a special case where setting an element's display to none in a keypress or keydown callback wouldn't prevent it from being written to.

Additionally, the relevant WPT test catching this behavior was modified to use .focus() instead of .select(), since .select() does not necessarily focus the input element per the spec and focusing is the whole purpose of the .select() line.

Testing: An existing WPT test already is supposed to catch this behavior, but because .select() doesn't focus the text control its called on, the tests weren't doing anything. This PR thus fixes that. Expected failures were also added but only because beforeinput is not fully implemented.
Fixes: #<!-- nolink -->48019 (issue described in the PR)
Reviewed in servo/servo#48165

Component: web-platform-tests → DOM: Editor
Product: Testing → Core
Attached file Notable wpt changes —

CI Results

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

Total 510 tests and 4 subtests

Status Summary

Firefox

OK : 4[GitHub] 504[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug, Gecko-windows11-64-25h2-debug] 509[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-opt]
PASS : 20[GitHub] 14610[Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug] 14612[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug] 14650[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt] 14652[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-opt]
FAIL : 4[GitHub] 1669[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-windows11-64-25h2-debug] 1671[Gecko-linux2404-64-debug, Gecko-windows11-32-25h2-debug] 1684[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-windows11-32-25h2-opt] 1686[Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-opt]
ERROR: 1

Chrome

OK : 4
PASS : 24

Safari

OK : 4
PASS : 24

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

(See attachment for full changes)

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/93a216a01243 https://hg.mozilla.org/integration/autoland/rev/022ad908f8ea [wpt PR 62777] - script: Do not perform `EditingAction`s in `EditingContext`s that do not have layout boxes, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: