Bug 1272297 - Do not check pattern validity while parser is creating this input element. r=smaug

This commit is contained in:
Ben Tian 2016-08-09 15:21:15 +08:00
parent 4b42312a6f
commit 6107aa70d5

View File

@ -1468,7 +1468,7 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
}
} else if (MaxLengthApplies() && aName == nsGkAtoms::maxlength) {
UpdateTooLongValidityState();
} else if (aName == nsGkAtoms::pattern) {
} else if (aName == nsGkAtoms::pattern && !mParserCreating) {
UpdatePatternMismatchValidityState();
} else if (aName == nsGkAtoms::multiple) {
UpdateTypeMismatchValidityState();