Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 1890633002: Check willValidate() for :in-range and :out-of-range. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed extra tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 9f0381e4f979ad9e6a99158e7ea4dbf484b74e6d..b37076766a78a8bafd0c779fcaed6e6a9f97fe42 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1457,12 +1457,12 @@ String HTMLInputElement::localizeValue(const String& proposedValue) const
bool HTMLInputElement::isInRange() const
{
- return m_inputType->isInRange(value());
+ return willValidate() && m_inputType->isInRange(value());
}
bool HTMLInputElement::isOutOfRange() const
{
- return m_inputType->isOutOfRange(value());
+ return willValidate() && m_inputType->isOutOfRange(value());
}
bool HTMLInputElement::isRequiredFormControl() const
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698