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

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

Issue 132233059: Synchronize is-valid flag upon programmatic clearing of file.value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
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 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 setSelectionRange(max, max); 994 setSelectionRange(max, max);
995 else 995 else
996 cacheSelectionInResponseToSetValue(max); 996 cacheSelectionInResponseToSetValue(max);
997 997
998 dispatchInputEvent(); 998 dispatchInputEvent();
999 } 999 }
1000 1000
1001 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt ate, TextFieldEventBehavior eventBehavior) 1001 void HTMLInputElement::setValue(const String& value, ExceptionState& exceptionSt ate, TextFieldEventBehavior eventBehavior)
1002 { 1002 {
1003 if (isFileUpload() && !value.isEmpty()) { 1003 if (isFileUpload() && !value.isEmpty()) {
1004 exceptionState.throwDOMException(InvalidStateError, "This input element accepts a filename, which may only be programatically set to the empty string.") ; 1004 exceptionState.throwDOMException(InvalidStateError, "This input element accepts a filename, which may only be programmatically set to the empty string." );
1005 return; 1005 return;
1006 } 1006 }
1007 setValue(value, eventBehavior); 1007 setValue(value, eventBehavior);
1008 } 1008 }
1009 1009
1010 void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even tBehavior) 1010 void HTMLInputElement::setValue(const String& value, TextFieldEventBehavior even tBehavior)
1011 { 1011 {
1012 if (!m_inputType->canSetValue(value)) 1012 if (!m_inputType->canSetValue(value))
1013 return; 1013 return;
1014 1014
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 } 1866 }
1867 1867
1868 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1868 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1869 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1869 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1870 { 1870 {
1871 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1871 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1872 } 1872 }
1873 #endif 1873 #endif
1874 1874
1875 } // namespace 1875 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698