| Index: Source/core/html/BaseTextInputType.cpp
|
| diff --git a/Source/core/html/BaseTextInputType.cpp b/Source/core/html/BaseTextInputType.cpp
|
| index fd9c9e5b748ad7c458ac641039637b4bacb9c57b..9a9540f70035465b5eab3d57c83b1dd8526df30b 100644
|
| --- a/Source/core/html/BaseTextInputType.cpp
|
| +++ b/Source/core/html/BaseTextInputType.cpp
|
| @@ -44,12 +44,9 @@ bool BaseTextInputType::patternMismatch(const String& value) const
|
| if (rawPattern.isNull() || value.isEmpty())
|
| return false;
|
| String pattern = "^(" + rawPattern + ")$";
|
| - RegularExpression regex(pattern, TextCaseSensitive);
|
| - if (!regex.isValid())
|
| - return false;
|
| int matchLength = 0;
|
| int valueLength = value.length();
|
| - int matchOffset = regex.match(value, 0, &matchLength);
|
| + int matchOffset = RegularExpression(pattern, TextCaseSensitive).match(value, 0, &matchLength);
|
| return matchOffset || matchLength != valueLength;
|
| }
|
|
|
|
|