github web-platform-tests/wpt merge_pr_45776

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
16 months ago

Make setting defaultValue from a trusted input event validate

This adds a large-ish test of the validation behavior of the
textarea element, which as far as I can tell is under-specified,
or at least I could not find this behavior in the spec. I looked
mainly here:

https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#validity-states

In particular, there are some interesting differences in the
validity of initially-empty vs initially-non-empty textareas.

This CL, though, also aligns the behavior of Chromium with both
WebKit and Gecko in the specific case where the input event
handler sets textarea.defaultValue. In that case, the textarea
will be validated correctly. Previous to this CL, Chromium would
not validate the textarea as a result of the change.

Fixed: 333940413
Change-Id: Iec38fb510296d34419b7ed3df8ab396d2d737d69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5463568
Auto-Submit: Mason Freed masonf@chromium.org
Reviewed-by: David Baron dbaron@chromium.org
Commit-Queue: David Baron dbaron@chromium.org
Cr-Commit-Position: refs/heads/main@{#1293030}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.