| 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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 void HTMLInputElement::setValueFromRenderer(const String& value) | 1093 void HTMLInputElement::setValueFromRenderer(const String& value) |
| 1094 { | 1094 { |
| 1095 // File upload controls will never use this. | 1095 // File upload controls will never use this. |
| 1096 ASSERT(!isFileUpload()); | 1096 ASSERT(!isFileUpload()); |
| 1097 | 1097 |
| 1098 m_suggestedValue = String(); | 1098 m_suggestedValue = String(); |
| 1099 | 1099 |
| 1100 // Renderer and our event handler are responsible for sanitizing values. | 1100 // Renderer and our event handler are responsible for sanitizing values. |
| 1101 ASSERT(value == sanitizeValue(value) || sanitizeValue(value).isEmpty()); | 1101 ASSERT(value == sanitizeValue(value) || sanitizeValue(value).isEmpty()); |
| 1102 | 1102 |
| 1103 // Workaround for bug where trailing \n is included in the result of textCon
tent. | 1103 m_valueIfDirty = value; |
| 1104 // The assert macro above may also be simplified to: value == constrainValue
(value) | |
| 1105 // http://bugs.webkit.org/show_bug.cgi?id=9661 | |
| 1106 m_valueIfDirty = value == "\n" ? emptyString() : value; | |
| 1107 | 1104 |
| 1108 setFormControlValueMatchesRenderer(true); | 1105 setFormControlValueMatchesRenderer(true); |
| 1109 m_wasModifiedByUser = true; | 1106 m_wasModifiedByUser = true; |
| 1110 | 1107 |
| 1111 // Input event is fired by the Node::defaultEventHandler for editable contro
ls. | 1108 // Input event is fired by the Node::defaultEventHandler for editable contro
ls. |
| 1112 if (!isTextField()) | 1109 if (!isTextField()) |
| 1113 dispatchInputEvent(); | 1110 dispatchInputEvent(); |
| 1114 notifyFormStateChanged(); | 1111 notifyFormStateChanged(); |
| 1115 | 1112 |
| 1116 setNeedsValidityCheck(); | 1113 setNeedsValidityCheck(); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1916 } | 1913 } |
| 1917 | 1914 |
| 1918 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 1915 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 1919 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() | 1916 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() |
| 1920 { | 1917 { |
| 1921 return m_inputType->customStyleForRenderer(originalStyleForRenderer()); | 1918 return m_inputType->customStyleForRenderer(originalStyleForRenderer()); |
| 1922 } | 1919 } |
| 1923 #endif | 1920 #endif |
| 1924 | 1921 |
| 1925 } // namespace | 1922 } // namespace |
| OLD | NEW |