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

Side by Side Diff: Source/WebCore/html/HTMLInputElement.cpp

Issue 8142040: Merge 96552 - REGRESSION(r94274): cloned text input loses value (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « LayoutTests/fast/forms/clone-input-with-dirty-value-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * 10 *
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 { 1020 {
1021 const HTMLInputElement* sourceElement = static_cast<const HTMLInputElement*> (source); 1021 const HTMLInputElement* sourceElement = static_cast<const HTMLInputElement*> (source);
1022 1022
1023 m_valueIfDirty = sourceElement->m_valueIfDirty; 1023 m_valueIfDirty = sourceElement->m_valueIfDirty;
1024 m_wasModifiedByUser = false; 1024 m_wasModifiedByUser = false;
1025 setChecked(sourceElement->m_isChecked); 1025 setChecked(sourceElement->m_isChecked);
1026 m_reflectsCheckedAttribute = sourceElement->m_reflectsCheckedAttribute; 1026 m_reflectsCheckedAttribute = sourceElement->m_reflectsCheckedAttribute;
1027 m_isIndeterminate = sourceElement->m_isIndeterminate; 1027 m_isIndeterminate = sourceElement->m_isIndeterminate;
1028 1028
1029 HTMLTextFormControlElement::copyNonAttributeProperties(source); 1029 HTMLTextFormControlElement::copyNonAttributeProperties(source);
1030
1031 setFormControlValueMatchesRenderer(false);
1032 updateInnerTextValue();
1030 } 1033 }
1031 1034
1032 String HTMLInputElement::value() const 1035 String HTMLInputElement::value() const
1033 { 1036 {
1034 String value; 1037 String value;
1035 if (m_inputType->getTypeSpecificValue(value)) 1038 if (m_inputType->getTypeSpecificValue(value))
1036 return value; 1039 return value;
1037 1040
1038 value = m_valueIfDirty; 1041 value = m_valueIfDirty;
1039 if (!value.isNull()) 1042 if (!value.isNull())
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 } 1953 }
1951 1954
1952 void HTMLInputElement::updateValueIfNeeded() 1955 void HTMLInputElement::updateValueIfNeeded()
1953 { 1956 {
1954 String newValue = sanitizeValue(m_valueIfDirty); 1957 String newValue = sanitizeValue(m_valueIfDirty);
1955 if (newValue != m_valueIfDirty) 1958 if (newValue != m_valueIfDirty)
1956 setValue(newValue); 1959 setValue(newValue);
1957 } 1960 }
1958 1961
1959 } // namespace 1962 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/clone-input-with-dirty-value-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698