Title: [118223] trunk/Source/WebKit/chromium
Revision
118223
Author
[email protected]
Date
2012-05-23 12:09:40 -0700 (Wed, 23 May 2012)

Log Message

Change acceptMIMETypes member to acceptTypes now that file extensions are legal accept types
https://bugs.webkit.org/show_bug.cgi?id=87271

Patch by Raymes Khoury <[email protected]> on 2012-05-23
Reviewed by Darin Fisher.

* public/WebFileChooserParams.h:
(WebFileChooserParams):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::runOpenPanel):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (118222 => 118223)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-23 19:03:26 UTC (rev 118222)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-23 19:09:40 UTC (rev 118223)
@@ -1,3 +1,15 @@
+2012-05-23  Raymes Khoury  <[email protected]>
+
+        Change acceptMIMETypes member to acceptTypes now that file extensions are legal accept types
+        https://bugs.webkit.org/show_bug.cgi?id=87271
+
+        Reviewed by Darin Fisher.
+
+        * public/WebFileChooserParams.h:
+        (WebFileChooserParams):
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::runOpenPanel):
+
 2012-05-23  Dana Jansens  <[email protected]>
 
         [chromium] Layers on main thread should get a RenderSurface for animating transform only if masksToBounds is true also

Modified: trunk/Source/WebKit/chromium/public/WebFileChooserParams.h (118222 => 118223)


--- trunk/Source/WebKit/chromium/public/WebFileChooserParams.h	2012-05-23 19:03:26 UTC (rev 118222)
+++ trunk/Source/WebKit/chromium/public/WebFileChooserParams.h	2012-05-23 19:09:40 UTC (rev 118223)
@@ -50,11 +50,14 @@
     // |initialValue| is a filename which the dialog should select by default.
     // It can be an empty string.
     WebString initialValue;
-    // This contains MIME type strings such as "audio/*" "text/plain".
-    // The dialog may restrict selectable files to the specified MIME types.
+    // This contains MIME type strings such as "audio/*" "text/plain" or file
+    // extensions beginning with a period (.) such as ".mp3" ".txt".
+    // The dialog may restrict selectable files to files with the specified MIME
+    // types or file extensions.
     // This list comes from an 'accept' attribute value of an INPUT element, and
-    // it contains only lower-cased MIME type strings of which format is valid.
-    WebVector<WebString> acceptMIMETypes;
+    // it contains only lower-cased MIME type strings and file extensions.
+    WebVector<WebString> acceptTypes;
+    WebVector<WebString> acceptMIMETypes; // FIXME: Remove this once https://chromiumcodereview.appspot.com/10414085 lands.
     // |selectedFiles| has filenames which a file upload control already selected.
     // A WebViewClient implementation may ask a user to select
     //  - removing a file from the selected files,

Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp (118222 => 118223)


--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-05-23 19:03:26 UTC (rev 118222)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-05-23 19:09:40 UTC (rev 118223)
@@ -725,7 +725,8 @@
 #else
     params.directory = false;
 #endif
-    params.acceptMIMETypes = fileChooser->settings().acceptMIMETypes;
+    params.acceptTypes = fileChooser->settings().acceptMIMETypes;
+    params.acceptMIMETypes = fileChooser->settings().acceptMIMETypes; // FIXME: Remove this once https://chromiumcodereview.appspot.com/10414085 lands.
     params.selectedFiles = fileChooser->settings().selectedFiles;
     if (params.selectedFiles.size() > 0)
         params.initialValue = params.selectedFiles[0];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to