OLD | NEW |
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 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 { | 1699 { |
1700 int maxLength; | 1700 int maxLength; |
1701 if (!parseHTMLInteger(value, maxLength)) | 1701 if (!parseHTMLInteger(value, maxLength)) |
1702 maxLength = maximumLength; | 1702 maxLength = maximumLength; |
1703 if (maxLength < 0 || maxLength > maximumLength) | 1703 if (maxLength < 0 || maxLength > maximumLength) |
1704 maxLength = maximumLength; | 1704 maxLength = maximumLength; |
1705 int oldMaxLength = m_maxLength; | 1705 int oldMaxLength = m_maxLength; |
1706 m_maxLength = maxLength; | 1706 m_maxLength = maxLength; |
1707 if (oldMaxLength != maxLength) | 1707 if (oldMaxLength != maxLength) |
1708 updateValueIfNeeded(); | 1708 updateValueIfNeeded(); |
1709 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAtt
ribute(maxlengthAttr)); | |
1710 setNeedsValidityCheck(); | 1709 setNeedsValidityCheck(); |
1711 } | 1710 } |
1712 | 1711 |
1713 void HTMLInputElement::parseMinLengthAttribute(const AtomicString& value) | 1712 void HTMLInputElement::parseMinLengthAttribute(const AtomicString& value) |
1714 { | 1713 { |
1715 int minLength; | 1714 int minLength; |
1716 if (!parseHTMLInteger(value, minLength)) | 1715 if (!parseHTMLInteger(value, minLength)) |
1717 minLength = 0; | 1716 minLength = 0; |
1718 if (minLength < 0) | 1717 if (minLength < 0) |
1719 minLength = 0; | 1718 minLength = 0; |
1720 m_minLength = minLength; | 1719 m_minLength = minLength; |
1721 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::fromAtt
ribute(minlengthAttr)); | |
1722 setNeedsValidityCheck(); | 1720 setNeedsValidityCheck(); |
1723 } | 1721 } |
1724 | 1722 |
1725 void HTMLInputElement::updateValueIfNeeded() | 1723 void HTMLInputElement::updateValueIfNeeded() |
1726 { | 1724 { |
1727 String newValue = sanitizeValue(m_valueIfDirty); | 1725 String newValue = sanitizeValue(m_valueIfDirty); |
1728 ASSERT(!m_valueIfDirty.isNull() || newValue.isNull()); | 1726 ASSERT(!m_valueIfDirty.isNull() || newValue.isNull()); |
1729 if (newValue != m_valueIfDirty) | 1727 if (newValue != m_valueIfDirty) |
1730 setValue(newValue); | 1728 setValue(newValue); |
1731 } | 1729 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 void HTMLInputElement::ensurePrimaryContent() | 1950 void HTMLInputElement::ensurePrimaryContent() |
1953 { | 1951 { |
1954 m_inputTypeView->ensurePrimaryContent(); | 1952 m_inputTypeView->ensurePrimaryContent(); |
1955 } | 1953 } |
1956 | 1954 |
1957 bool HTMLInputElement::hasFallbackContent() const | 1955 bool HTMLInputElement::hasFallbackContent() const |
1958 { | 1956 { |
1959 return m_inputTypeView->hasFallbackContent(); | 1957 return m_inputTypeView->hasFallbackContent(); |
1960 } | 1958 } |
1961 } // namespace | 1959 } // namespace |
OLD | NEW |