| 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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 void HTMLInputElement::setValueFromRenderer(const String& value) | 1046 void HTMLInputElement::setValueFromRenderer(const String& value) |
| 1047 { | 1047 { |
| 1048 // File upload controls will never use this. | 1048 // File upload controls will never use this. |
| 1049 ASSERT(!isFileUpload()); | 1049 ASSERT(!isFileUpload()); |
| 1050 | 1050 |
| 1051 m_suggestedValue = String(); | 1051 m_suggestedValue = String(); |
| 1052 | 1052 |
| 1053 // Renderer and our event handler are responsible for sanitizing values. | 1053 // Renderer and our event handler are responsible for sanitizing values. |
| 1054 ASSERT(value == sanitizeValue(value) || sanitizeValue(value).isEmpty()); | 1054 ASSERT(value == sanitizeValue(value) || sanitizeValue(value).isEmpty()); |
| 1055 | 1055 |
| 1056 // Workaround for bug where trailing \n is included in the result of textCon
tent. | 1056 m_valueIfDirty = value; |
| 1057 // The assert macro above may also be simplified to: value == constrainValue
(value) | |
| 1058 // http://bugs.webkit.org/show_bug.cgi?id=9661 | |
| 1059 m_valueIfDirty = value == "\n" ? emptyString() : value; | |
| 1060 | 1057 |
| 1061 setFormControlValueMatchesRenderer(true); | 1058 setFormControlValueMatchesRenderer(true); |
| 1062 m_wasModifiedByUser = true; | 1059 m_wasModifiedByUser = true; |
| 1063 | 1060 |
| 1064 // Input event is fired by the Node::defaultEventHandler for editable contro
ls. | 1061 // Input event is fired by the Node::defaultEventHandler for editable contro
ls. |
| 1065 if (!isTextField()) | 1062 if (!isTextField()) |
| 1066 dispatchInputEvent(); | 1063 dispatchInputEvent(); |
| 1067 notifyFormStateChanged(); | 1064 notifyFormStateChanged(); |
| 1068 | 1065 |
| 1069 setNeedsValidityCheck(); | 1066 setNeedsValidityCheck(); |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 } | 1879 } |
| 1883 | 1880 |
| 1884 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1881 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1885 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1882 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1886 { | 1883 { |
| 1887 return m_inputType->customStyleForRenderer(document()->styleResolver()->styl
eForElement(this)); | 1884 return m_inputType->customStyleForRenderer(document()->styleResolver()->styl
eForElement(this)); |
| 1888 } | 1885 } |
| 1889 #endif | 1886 #endif |
| 1890 | 1887 |
| 1891 } // namespace | 1888 } // namespace |
| OLD | NEW |