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

Unified Diff: Source/core/html/forms/FileInputType.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: Remove redundant waitUntilDone() calls Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/FileInputType.cpp
diff --git a/Source/core/html/forms/FileInputType.cpp b/Source/core/html/forms/FileInputType.cpp
index d85265a183e6cc5519d41c283760763000c63be6..40a753e86bc34e2c5a672a69f38c336d3ff8a42b 100644
--- a/Source/core/html/forms/FileInputType.cpp
+++ b/Source/core/html/forms/FileInputType.cpp
@@ -200,10 +200,14 @@ bool FileInputType::getTypeSpecificValue(String& value)
return true;
}
-void FileInputType::setValue(const String&, bool, TextFieldEventBehavior)
+void FileInputType::setValue(const String&, bool valueChanged, TextFieldEventBehavior)
{
+ if (!valueChanged)
+ return;
+
m_fileList->clear();
element().setNeedsStyleRecalc();
+ element().setNeedsValidityCheck();
}
PassRefPtr<FileList> FileInputType::createFileList(const Vector<FileChooserFileInfo>& files) const
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698