Bug 1737364 - Part 2: Elements should be barred from constraint validation if it has a datalist element ancestor; r=smaug
Add a new flag, ELEMENT_IS_DATALIST_OR_HAS_DATALIST_ANCESTOR, to indicate that the element is a HTML datalist element or has a HTML datalist element ancestor. Per https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element:barred-from-constraint-validation Differential Revision: https://phabricator.services.mozilla.com/D129717
This commit is contained in:
@@ -991,7 +991,8 @@ void HTMLTextAreaElement::UpdateValueMissingValidityState() {
|
||||
|
||||
void HTMLTextAreaElement::UpdateBarredFromConstraintValidation() {
|
||||
SetBarredFromConstraintValidation(
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::readonly) || IsDisabled());
|
||||
HasAttr(kNameSpaceID_None, nsGkAtoms::readonly) ||
|
||||
HasFlag(ELEMENT_IS_DATALIST_OR_HAS_DATALIST_ANCESTOR) || IsDisabled());
|
||||
}
|
||||
|
||||
nsresult HTMLTextAreaElement::GetValidationMessage(
|
||||
|
||||
Reference in New Issue
Block a user