diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index afd248710f4..930a07ffb68 100644
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -477,24 +477,6 @@ impl HTMLInputElement {
textinput.set_content(value);
}
- fn does_readonly_apply(&self) -> bool {
- matches!(
- self.input_type(),
- InputType::Text |
- InputType::Search |
- InputType::Url |
- InputType::Tel |
- InputType::Email |
- InputType::Password |
- InputType::Date |
- InputType::Month |
- InputType::Week |
- InputType::Time |
- InputType::DatetimeLocal |
- InputType::Number
- )
- }
-
fn does_minmaxlength_apply(&self) -> bool {
matches!(
self.input_type(),
@@ -2753,7 +2735,7 @@ impl Validatable for HTMLInputElement {
InputType::Hidden | InputType::Button | InputType::Reset => false,
_ => {
!(self.upcast::().disabled_state() ||
- (self.ReadOnly() && self.does_readonly_apply()) ||
+ self.ReadOnly() ||
is_barred_by_datalist_ancestor(self.upcast()))
},
}
diff --git a/tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini b/tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini
deleted file mode 100644
index 959d7e9e98b..00000000000
--- a/tests/wpt/meta/html/semantics/forms/constraints/form-validation-willValidate.html.ini
+++ /dev/null
@@ -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