| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 9 * Copyright (C) 2010 Google Inc. All rights reserved. | 9 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 bool valueChanged = sanitizedValue != this->value(); | 1093 bool valueChanged = sanitizedValue != this->value(); |
| 1094 | 1094 |
| 1095 setLastChangeWasNotUserEdit(); | 1095 setLastChangeWasNotUserEdit(); |
| 1096 m_needsToUpdateViewValue = true; | 1096 m_needsToUpdateViewValue = true; |
| 1097 // Prevent TextFieldInputType::setValue from using the suggested value. | 1097 // Prevent TextFieldInputType::setValue from using the suggested value. |
| 1098 m_suggestedValue = String(); | 1098 m_suggestedValue = String(); |
| 1099 | 1099 |
| 1100 m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior); | 1100 m_inputType->setValue(sanitizedValue, valueChanged, eventBehavior); |
| 1101 m_inputTypeView->didSetValue(sanitizedValue, valueChanged); | 1101 m_inputTypeView->didSetValue(sanitizedValue, valueChanged); |
| 1102 | 1102 |
| 1103 if (valueChanged && eventBehavior == DispatchNoEvent) | 1103 if (valueChanged) |
| 1104 setTextAsOfLastFormControlChangeEvent(this->value()); | 1104 notifyFormStateChanged(); |
| 1105 | |
| 1106 if (!valueChanged) | |
| 1107 return; | |
| 1108 | |
| 1109 notifyFormStateChanged(); | |
| 1110 } | 1105 } |
| 1111 | 1106 |
| 1112 void HTMLInputElement::setNonAttributeValue(const String& sanitizedValue) { | 1107 void HTMLInputElement::setNonAttributeValue(const String& sanitizedValue) { |
| 1113 // This is a common code for ValueMode::kValue. | 1108 // This is a common code for ValueMode::kValue. |
| 1114 DCHECK_EQ(m_inputType->valueMode(), ValueMode::kValue); | 1109 DCHECK_EQ(m_inputType->valueMode(), ValueMode::kValue); |
| 1115 m_nonAttributeValue = sanitizedValue; | 1110 m_nonAttributeValue = sanitizedValue; |
| 1116 m_hasDirtyValue = true; | 1111 m_hasDirtyValue = true; |
| 1117 setNeedsValidityCheck(); | 1112 setNeedsValidityCheck(); |
| 1118 if (m_inputType->isSteppable()) { | 1113 if (m_inputType->isSteppable()) { |
| 1119 pseudoStateChanged(CSSSelector::PseudoInRange); | 1114 pseudoStateChanged(CSSSelector::PseudoInRange); |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1951 | 1946 |
| 1952 bool HTMLInputElement::hasFallbackContent() const { | 1947 bool HTMLInputElement::hasFallbackContent() const { |
| 1953 return m_inputTypeView->hasFallbackContent(); | 1948 return m_inputTypeView->hasFallbackContent(); |
| 1954 } | 1949 } |
| 1955 | 1950 |
| 1956 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { | 1951 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { |
| 1957 return m_inputType->setFilesFromPaths(paths); | 1952 return m_inputType->setFilesFromPaths(paths); |
| 1958 } | 1953 } |
| 1959 | 1954 |
| 1960 } // namespace blink | 1955 } // namespace blink |
| OLD | NEW |