2011-04-05 Sailesh Agrawal <sail@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2011 09:06:45 +0000 (09:06 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Apr 2011 09:06:45 +0000 (09:06 +0000)
        Reviewed by Darin Fisher.

        Don't clear existing files if the user cancels the file chooser dialog.
        https://bugs.webkit.org/show_bug.cgi?id=55200

        * src/WebFileChooserCompletionImpl.cpp:
        (WebKit::WebFileChooserCompletionImpl::didChooseFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp

index 6a1594a..c59786e 100644 (file)
@@ -1,3 +1,13 @@
+2011-04-05  Sailesh Agrawal  <sail@chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Don't clear existing files if the user cancels the file chooser dialog.
+        https://bugs.webkit.org/show_bug.cgi?id=55200
+
+        * src/WebFileChooserCompletionImpl.cpp:
+        (WebKit::WebFileChooserCompletionImpl::didChooseFile):
+
 2011-04-05  John Mellor  <johnme@chromium.org>
 
         Reviewed by Darin Fisher.
index ef2409c..d7583c5 100644 (file)
@@ -46,8 +46,7 @@ void WebFileChooserCompletionImpl::didChooseFile(const WebVector<WebString>& fil
 {
     if (fileNames.size() == 1)
         m_fileChooser->chooseFile(fileNames[0]);
-    else {
-        // This clause handles a case of file_names.size()==0 too.
+    else if (fileNames.size() > 0) {
         Vector<WTF::String> paths;
         for (size_t i = 0; i < fileNames.size(); ++i)
             paths.append(fileNames[i]);