Fix form validation for readonly inputs and update WPT expectations (#36090)

The HTML specification states that an input element with the `readonly`
attribute must be barred from constraint validation. Our implementation
previously included an extra check (`does_readonly_apply()`) to verify
if `readonly` applies to the input type, which is unnecessary.

This caused three test failures in:
tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini

- Removed `does_readonly_apply()` as it is not required for validation.
- Removed `tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini` since the test now passes.

To update the Web Platform Test expectations, see:
https://book.servo.org/hacking/testing.html#updating-web-platform-test-expectations

Fixes servo/servo#36076

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
This commit is contained in:
elomscansio 2025-03-22 15:35:13 -04:00 committed by GitHub
parent 7c574141c0
commit 80434d4644
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 28 deletions

View file

@ -1,9 +0,0 @@
[form-validation-willValidate.html]
[[INPUT in COLOR status\] Must be barred from the constraint validation if it is readonly]
expected: FAIL
[[INPUT in FILE status\] Must be barred from the constraint validation if it is readonly]
expected: FAIL
[[INPUT in SUBMIT status\] Must be barred from the constraint validation if it is readonly]
expected: FAIL