Changeset 80430 in webkit


Ignore:
Timestamp:
Mar 5, 2011 3:38:17 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-03-05 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r80428.
http://trac.webkit.org/changeset/80428
https://bugs.webkit.org/show_bug.cgi?id=55833

Broke SnowLeopard (Requested by xan_ on #webkit).

  • http/tests/plugins/resources/dump-post.pl:
  • platform/gtk/Skipped:

2011-03-05 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r80428.
http://trac.webkit.org/changeset/80428
https://bugs.webkit.org/show_bug.cgi?id=55833

Broke SnowLeopard (Requested by xan_ on #webkit).

  • plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::handlePostReadFile):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80428 r80430  
     12011-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r80428.
     4        http://trac.webkit.org/changeset/80428
     5        https://bugs.webkit.org/show_bug.cgi?id=55833
     6
     7        Broke SnowLeopard (Requested by xan_ on #webkit).
     8
     9        * http/tests/plugins/resources/dump-post.pl:
     10        * platform/gtk/Skipped:
     11
    1122011-03-05  Martin Robinson  <mrobinson@igalia.com>
    213
  • trunk/LayoutTests/http/tests/plugins/resources/dump-post.pl

    r80428 r80430  
    88
    99print $cgi->header('text/plain');
    10 print $cgi->param('POSTDATA');
     10print $cgi->param('keywords');
  • trunk/LayoutTests/platform/gtk/Skipped

    r80428 r80430  
    514514
    515515http/tests/plugins/npapi-response-headers.html
     516http/tests/plugins/post-url-file.html
    516517http/tests/security/feed-urls-from-remote.html
    517518http/tests/security/mixedContent/insecure-css-in-main-frame.html
  • trunk/Source/WebCore/ChangeLog

    r80429 r80430  
     12011-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r80428.
     4        http://trac.webkit.org/changeset/80428
     5        https://bugs.webkit.org/show_bug.cgi?id=55833
     6
     7        Broke SnowLeopard (Requested by xan_ on #webkit).
     8
     9        * plugins/gtk/PluginViewGtk.cpp:
     10        (WebCore::PluginView::handlePostReadFile):
     11
    1122011-03-01  Martin Robinson  <mrobinson@igalia.com>
    213
  • trunk/Source/WebCore/plugins/gtk/PluginViewGtk.cpp

    r80429 r80430  
    560560}
    561561
    562 NPError PluginView::handlePostReadFile(Vector<char>& outputBuffer, uint32_t filenameLength, const char* filenameBuffer)
    563 {
    564     // There doesn't seem to be any documentation about what encoding the filename
    565     // is in, but most ports seem to assume UTF-8 here and the test plugin is definitely
    566     // sending the path in UTF-8 encoding.
    567     CString filename(filenameBuffer, filenameLength);
    568 
    569     GRefPtr<GFile> file = adoptGRef(g_file_new_for_commandline_arg(filename.data()));
    570     if (g_file_query_file_type(file.get(), G_FILE_QUERY_INFO_NONE, 0) != G_FILE_TYPE_REGULAR)
     562NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32_t len, const char* buf)
     563{
     564    WTF::String filename(buf, len);
     565
     566    if (filename.startsWith("file:///"))
     567        filename = filename.substring(8);
     568
     569    // Get file info
     570    if (!g_file_test ((filename.utf8()).data(), (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)))
    571571        return NPERR_FILE_NOT_FOUND;
    572572
    573     GRefPtr<GFileInfo> fileInfo = adoptGRef(g_file_query_info(file.get(),
    574                                                               G_FILE_ATTRIBUTE_STANDARD_SIZE,
    575                                                               G_FILE_QUERY_INFO_NONE,
    576                                                               0, 0));
    577     if (!fileInfo)
     573    //FIXME - read the file data into buffer
     574    FILE* fileHandle = fopen((filename.utf8()).data(), "r");
     575   
     576    if (fileHandle == 0)
    578577        return NPERR_FILE_NOT_FOUND;
    579578
    580     GRefPtr<GFileInputStream> inputStream = adoptGRef(g_file_read(file.get(), 0, 0));
    581     if (!inputStream)
    582         return NPERR_FILE_NOT_FOUND;
    583 
    584     outputBuffer.resize(g_file_info_get_size(fileInfo.get()));
    585     gsize bytesRead = 0;
    586     if (!g_input_stream_read_all(G_INPUT_STREAM(inputStream.get()),
    587                                  outputBuffer.data(), outputBuffer.size(), &bytesRead, 0, 0))
     579    //buffer.resize();
     580
     581    int bytesRead = fread(buffer.data(), 1, 0, fileHandle);
     582
     583    fclose(fileHandle);
     584
     585    if (bytesRead <= 0)
    588586        return NPERR_FILE_NOT_FOUND;
    589587
Note: See TracChangeset for help on using the changeset viewer.