зеркало из https://github.com/mozilla/gecko-dev.git
Bug 767806 - Don't create a useless string every time we check for input's validity. r=jlebar
This commit is contained in:
Родитель
bd58047409
Коммит
c704b5bab0
|
@ -3674,12 +3674,14 @@ nsHTMLInputElement::HasTypeMismatch() const
|
|||
bool
|
||||
nsHTMLInputElement::HasPatternMismatch() const
|
||||
{
|
||||
nsAutoString pattern;
|
||||
if (!DoesPatternApply() ||
|
||||
!GetAttr(kNameSpaceID_None, nsGkAtoms::pattern, pattern)) {
|
||||
!HasAttr(kNameSpaceID_None, nsGkAtoms::pattern)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoString pattern;
|
||||
GetAttr(kNameSpaceID_None, nsGkAtoms::pattern, pattern);
|
||||
|
||||
nsAutoString value;
|
||||
NS_ENSURE_SUCCESS(GetValueInternal(value), false);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче