| 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 m_needsToUpdateViewValue = true; | 948 m_needsToUpdateViewValue = true; |
| 949 m_suggestedValue = sanitizeValue(value); | 949 m_suggestedValue = sanitizeValue(value); |
| 950 setNeedsStyleRecalc(SubtreeStyleChange); | 950 setNeedsStyleRecalc(SubtreeStyleChange); |
| 951 m_inputTypeView->updateView(); | 951 m_inputTypeView->updateView(); |
| 952 } | 952 } |
| 953 | 953 |
| 954 void HTMLInputElement::setEditingValue(const String& value) | 954 void HTMLInputElement::setEditingValue(const String& value) |
| 955 { | 955 { |
| 956 if (!renderer() || !isTextField()) | 956 if (!renderer() || !isTextField()) |
| 957 return; | 957 return; |
| 958 setInnerTextValue(value); | 958 setInnerEditorValue(value); |
| 959 subtreeHasChanged(); | 959 subtreeHasChanged(); |
| 960 | 960 |
| 961 unsigned max = value.length(); | 961 unsigned max = value.length(); |
| 962 if (focused()) | 962 if (focused()) |
| 963 setSelectionRange(max, max); | 963 setSelectionRange(max, max); |
| 964 else | 964 else |
| 965 cacheSelectionInResponseToSetValue(max); | 965 cacheSelectionInResponseToSetValue(max); |
| 966 | 966 |
| 967 dispatchInputEvent(); | 967 dispatchInputEvent(); |
| 968 } | 968 } |
| 969 | 969 |
| 970 void HTMLInputElement::setInnerTextValue(const String& value) | 970 void HTMLInputElement::setInnerEditorValue(const String& value) |
| 971 { | 971 { |
| 972 HTMLTextFormControlElement::setInnerTextValue(value); | 972 HTMLTextFormControlElement::setInnerEditorValue(value); |
| 973 m_needsToUpdateViewValue = false; | 973 m_needsToUpdateViewValue = false; |
| 974 } | 974 } |
| 975 | 975 |
| 976 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt
ate, TextFieldEventBehavior eventBehavior) | 976 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt
ate, TextFieldEventBehavior eventBehavior) |
| 977 { | 977 { |
| 978 if (isFileUpload() && !value.isEmpty()) { | 978 if (isFileUpload() && !value.isEmpty()) { |
| 979 exceptionState.throwDOMException(InvalidStateError, "This input element
accepts a filename, which may only be programmatically set to the empty string."
); | 979 exceptionState.throwDOMException(InvalidStateError, "This input element
accepts a filename, which may only be programmatically set to the empty string."
); |
| 980 return; | 980 return; |
| 981 } | 981 } |
| 982 setValue(value, eventBehavior); | 982 setValue(value, eventBehavior); |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); | 1858 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); |
| 1859 } | 1859 } |
| 1860 #endif | 1860 #endif |
| 1861 | 1861 |
| 1862 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) | 1862 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St
ring& newValue) |
| 1863 { | 1863 { |
| 1864 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; | 1864 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue)
; |
| 1865 } | 1865 } |
| 1866 | 1866 |
| 1867 } // namespace | 1867 } // namespace |
| OLD | NEW |