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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 1450
1451 String HTMLInputElement::localizeValue(const String& proposedValue) const 1451 String HTMLInputElement::localizeValue(const String& proposedValue) const
1452 { 1452 {
1453 if (proposedValue.isNull()) 1453 if (proposedValue.isNull())
1454 return proposedValue; 1454 return proposedValue;
1455 return m_inputType->localizeValue(proposedValue); 1455 return m_inputType->localizeValue(proposedValue);
1456 } 1456 }
1457 1457
1458 bool HTMLInputElement::isInRange() const 1458 bool HTMLInputElement::isInRange() const
1459 { 1459 {
1460 return m_inputType->isInRange(value()); 1460 return willValidate() && m_inputType->isInRange(value());
1461 } 1461 }
1462 1462
1463 bool HTMLInputElement::isOutOfRange() const 1463 bool HTMLInputElement::isOutOfRange() const
1464 { 1464 {
1465 return m_inputType->isOutOfRange(value()); 1465 return willValidate() && m_inputType->isOutOfRange(value());
1466 } 1466 }
1467 1467
1468 bool HTMLInputElement::isRequiredFormControl() const 1468 bool HTMLInputElement::isRequiredFormControl() const
1469 { 1469 {
1470 return m_inputType->supportsRequired() && isRequired(); 1470 return m_inputType->supportsRequired() && isRequired();
1471 } 1471 }
1472 1472
1473 bool HTMLInputElement::matchesReadOnlyPseudoClass() const 1473 bool HTMLInputElement::matchesReadOnlyPseudoClass() const
1474 { 1474 {
1475 return m_inputType->supportsReadOnly() && isReadOnly(); 1475 return m_inputType->supportsReadOnly() && isReadOnly();
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 void HTMLInputElement::ensurePrimaryContent() 1928 void HTMLInputElement::ensurePrimaryContent()
1929 { 1929 {
1930 m_inputTypeView->ensurePrimaryContent(); 1930 m_inputTypeView->ensurePrimaryContent();
1931 } 1931 }
1932 1932
1933 bool HTMLInputElement::hasFallbackContent() const 1933 bool HTMLInputElement::hasFallbackContent() const
1934 { 1934 {
1935 return m_inputTypeView->hasFallbackContent(); 1935 return m_inputTypeView->hasFallbackContent();
1936 } 1936 }
1937 } // namespace blink 1937 } // namespace blink
OLDNEW
« 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