| Index: Source/core/html/TextFieldInputType.cpp
|
| diff --git a/Source/core/html/TextFieldInputType.cpp b/Source/core/html/TextFieldInputType.cpp
|
| index c5df696efbe3517d3c442a6059c67eff6fc12ceb..d52e604e0c5e3f2c653ca8d34d2321f704101eb7 100644
|
| --- a/Source/core/html/TextFieldInputType.cpp
|
| +++ b/Source/core/html/TextFieldInputType.cpp
|
| @@ -48,6 +48,7 @@
|
| #include "core/page/ChromeClient.h"
|
| #include "core/page/Frame.h"
|
| #include "core/page/Page.h"
|
| +#include "core/page/Settings.h"
|
| #include "core/rendering/RenderLayer.h"
|
| #include "core/rendering/RenderTextControlSingleLine.h"
|
| #include "core/rendering/RenderTheme.h"
|
| @@ -83,9 +84,18 @@ bool TextFieldInputType::isTextField() const
|
| return true;
|
| }
|
|
|
| +static inline bool shouldIgnoreRequiredAttribute(const HTMLInputElement& input)
|
| +{
|
| + if (!input.document()->settings() || !input.document()->settings()->needsSiteSpecificQuirks())
|
| + return false;
|
| + if (!equalIgnoringCase(input.document()->url().host(), "egov.uscis.gov"))
|
| + return false;
|
| + return input.fastGetAttribute(requiredAttr) == "no";
|
| +}
|
| +
|
| bool TextFieldInputType::valueMissing(const String& value) const
|
| {
|
| - return element()->isRequired() && value.isEmpty();
|
| + return !shouldIgnoreRequiredAttribute(*element()) && element()->isRequired() && value.isEmpty();
|
| }
|
|
|
| bool TextFieldInputType::canSetSuggestedValue()
|
|
|