Fix by Darin, reviewed by me.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2007 00:31:41 +0000 (00:31 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2007 00:31:41 +0000 (00:31 +0000)
        Fix for REGRESSION: Can't upload attachments to bugzilla since the file upload control is reset immediately
        http://bugs.webkit.org/show_bug.cgi?id=13461

        * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement):
        Only clear the FileChooser if the value is empty *and* (not or) the filename is empty.

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

WebCore/ChangeLog
WebCore/rendering/RenderFileUploadControl.cpp

index 7575bf3..a127403 100644 (file)
@@ -1,5 +1,15 @@
 2007-04-23  Adele Peterson  <adele@apple.com>
 
+        Fix by Darin, reviewed by me.
+
+        Fix for REGRESSION: Can't upload attachments to bugzilla since the file upload control is reset immediately 
+        http://bugs.webkit.org/show_bug.cgi?id=13461
+
+        * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement):
+        Only clear the FileChooser if the value is empty *and* (not or) the filename is empty.
+
+2007-04-23  Adele Peterson  <adele@apple.com>
+
         Reviewed by Adam.
 
         Updated fix for <rdar://problem/4887426> Set a reasonable maximum number of recent searches for search menu
index 3d245b5..88984f5 100644 (file)
@@ -129,7 +129,7 @@ void RenderFileUploadControl::updateFromElement()
 
     // This only supports clearing out the filename, but that's OK because for
     // security reasons that's the only change the DOM is allowed to make.
-    if (inputElement->value().isEmpty() || !m_fileChooser->filename().isEmpty()) {
+    if (inputElement->value().isEmpty() && !m_fileChooser->filename().isEmpty()) {
         m_fileChooser->clear();
         repaint();
     }