Changeset 46006 in webkit


Ignore:
Timestamp:
Jul 16, 2009 9:36:24 PM (15 years ago)
Author:
abarth@webkit.org
Message:

2009-07-16 Kent Tamura <tkent@chromium.org>

Reviewed by Eric Seidel and Adam Barth.

A test for for non-multipart file upload form submission.
This test is disabled for non-Mac platforms because of beginDragWithFiles().
<https://bugs.webkit.org/show_bug.cgi?id=26505>

  • fast/forms/get-file-upload-expected.txt: Added.
  • fast/forms/get-file-upload.html: Added.
  • platform/gtk/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:

2009-07-16 Kent Tamura <tkent@chromium.org>

Reviewed by Eric Seidel.

Sends the basename of a selected file for non-multipart form submission.
<https://bugs.webkit.org/show_bug.cgi?id=26505>

Test: fast/forms/get-file-upload.html

  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::appendFormData):
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r46002 r46006  
     12009-07-16  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel and Adam Barth.
     4
     5        A test for for non-multipart file upload form submission.
     6        This test is disabled for non-Mac platforms because of beginDragWithFiles().
     7        <https://bugs.webkit.org/show_bug.cgi?id=26505>
     8
     9        * fast/forms/get-file-upload-expected.txt: Added.
     10        * fast/forms/get-file-upload.html: Added.
     11        * platform/gtk/Skipped:
     12        * platform/qt/Skipped:
     13        * platform/win/Skipped:
     14
    1152009-07-16  Dan Bernstein  <mitz@apple.com>
    216
  • trunk/LayoutTests/platform/gtk/Skipped

    r45983 r46006  
    17391739fast/forms/focus-selection-textarea.html
    17401740fast/forms/form-and-frame-interaction-retains-values.html
     1741fast/forms/get-file-upload.html
    17411742fast/forms/input-radio-checked-tab.html
    17421743fast/forms/input-select-on-click.html
  • trunk/LayoutTests/platform/qt/Skipped

    r45983 r46006  
    1919fast/events/drag-to-navigate.html
    2020fast/events/prevent-drag-to-navigate.html
     21fast/forms/get-file-upload.html
    2122http/tests/security/clipboard/clipboard-file-access.html
    2223
  • trunk/LayoutTests/platform/win/Skipped

    r45983 r46006  
    186186fast/events/drag-to-navigate.html
    187187fast/events/prevent-drag-to-navigate.html
     188fast/forms/get-file-upload.html
    188189http/tests/security/clipboard/clipboard-file-access.html
    189190
  • trunk/WebCore/ChangeLog

    r46005 r46006  
     12009-07-16  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Sends the basename of a selected file for non-multipart form submission.
     6        <https://bugs.webkit.org/show_bug.cgi?id=26505>
     7
     8        Test: fast/forms/get-file-upload.html
     9
     10        * html/HTMLInputElement.cpp:
     11        (WebCore::HTMLInputElement::appendFormData):
     12
    1132009-07-16  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebCore/html/HTMLInputElement.cpp

    r45999 r46006  
    839839
    840840        case FILE: {
    841             // Can't submit file on GET.
    842             if (!multipart)
    843                 return false;
     841            unsigned numFiles = m_fileList->length();
     842            if (!multipart) {
     843                // Send only the basenames.
     844                // 4.10.16.4 and 4.10.16.6 sections in HTML5.
     845
     846                // Unlike the multipart case, we have no special
     847                // handling for the empty fileList because Netscape
     848                // doesn't support for non-multipart submission of
     849                // file inputs, and Firefox doesn't add "name=" query
     850                // parameter.
     851
     852                for (unsigned i = 0; i < numFiles; ++i) {
     853                    encoding.appendData(name(), m_fileList->item(i)->fileName());
     854                }
     855                return true;
     856            }
    844857
    845858            // If no filename at all is entered, return successful but empty.
    846859            // Null would be more logical, but Netscape posts an empty file. Argh.
    847             unsigned numFiles = m_fileList->length();
    848860            if (!numFiles) {
    849861                encoding.appendFile(name(), File::create(""));
Note: See TracChangeset for help on using the changeset viewer.