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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 } | 984 } |
985 | 985 |
986 void HTMLInputElement::setEditingValue(const String& value) | 986 void HTMLInputElement::setEditingValue(const String& value) |
987 { | 987 { |
988 if (!layoutObject() || !isTextField()) | 988 if (!layoutObject() || !isTextField()) |
989 return; | 989 return; |
990 setInnerEditorValue(value); | 990 setInnerEditorValue(value); |
991 subtreeHasChanged(); | 991 subtreeHasChanged(); |
992 | 992 |
993 unsigned max = value.length(); | 993 unsigned max = value.length(); |
994 if (focused()) | 994 setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEvent)
; |
995 setSelectionRange(max, max, SelectionHasNoDirection, NotDispatchSelectEv
ent); | |
996 else | |
997 cacheSelectionInResponseToSetValue(max); | |
998 | |
999 dispatchInputEvent(); | 995 dispatchInputEvent(); |
1000 } | 996 } |
1001 | 997 |
1002 void HTMLInputElement::setInnerEditorValue(const String& value) | 998 void HTMLInputElement::setInnerEditorValue(const String& value) |
1003 { | 999 { |
1004 HTMLTextFormControlElement::setInnerEditorValue(value); | 1000 HTMLTextFormControlElement::setInnerEditorValue(value); |
1005 m_needsToUpdateViewValue = false; | 1001 m_needsToUpdateViewValue = false; |
1006 } | 1002 } |
1007 | 1003 |
1008 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt
ate, TextFieldEventBehavior eventBehavior) | 1004 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt
ate, TextFieldEventBehavior eventBehavior) |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 { | 1908 { |
1913 return m_inputTypeView->hasFallbackContent(); | 1909 return m_inputTypeView->hasFallbackContent(); |
1914 } | 1910 } |
1915 | 1911 |
1916 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) | 1912 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) |
1917 { | 1913 { |
1918 return m_inputType->setFilesFromPaths(paths); | 1914 return m_inputType->setFilesFromPaths(paths); |
1919 } | 1915 } |
1920 | 1916 |
1921 } // namespace blink | 1917 } // namespace blink |
OLD | NEW |