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

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

Issue 7796022: Merge 94586 - REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on c... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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 | « Source/WebCore/WebCore.exp.in ('k') | Source/WebCore/testing/Internals.h » ('j') | 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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 return m_suggestedValue; 1066 return m_suggestedValue;
1067 } 1067 }
1068 1068
1069 void HTMLInputElement::setSuggestedValue(const String& value) 1069 void HTMLInputElement::setSuggestedValue(const String& value)
1070 { 1070 {
1071 if (!m_inputType->canSetSuggestedValue()) 1071 if (!m_inputType->canSetSuggestedValue())
1072 return; 1072 return;
1073 setFormControlValueMatchesRenderer(false); 1073 setFormControlValueMatchesRenderer(false);
1074 m_suggestedValue = sanitizeValue(value); 1074 m_suggestedValue = sanitizeValue(value);
1075 updatePlaceholderVisibility(false); 1075 updatePlaceholderVisibility(false);
1076 if (renderer())
1077 renderer()->updateFromElement();
1078 setNeedsStyleRecalc(); 1076 setNeedsStyleRecalc();
1077 updateInnerTextValue();
1079 } 1078 }
1080 1079
1081 void HTMLInputElement::setValue(const String& value, bool sendChangeEvent) 1080 void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
1082 { 1081 {
1083 if (!m_inputType->canSetValue(value)) 1082 if (!m_inputType->canSetValue(value))
1084 return; 1083 return;
1085 1084
1086 String sanitizedValue = sanitizeValue(value); 1085 String sanitizedValue = sanitizeValue(value);
1087 bool valueChanged = sanitizedValue != this->value(); 1086 bool valueChanged = sanitizedValue != this->value();
1088 1087
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 } 1950 }
1952 1951
1953 void HTMLInputElement::updateValueIfNeeded() 1952 void HTMLInputElement::updateValueIfNeeded()
1954 { 1953 {
1955 String newValue = sanitizeValue(m_valueIfDirty); 1954 String newValue = sanitizeValue(m_valueIfDirty);
1956 if (newValue != m_valueIfDirty) 1955 if (newValue != m_valueIfDirty)
1957 setValue(newValue); 1956 setValue(newValue);
1958 } 1957 }
1959 1958
1960 } // namespace 1959 } // namespace
OLDNEW
« no previous file with comments | « Source/WebCore/WebCore.exp.in ('k') | Source/WebCore/testing/Internals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698