Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2009-12-30 Jakub Wieczorek <faw217@gmail.com>
        Reviewed by Simon Hausmann.

        [Qt] Fix PluginView::handlePostReadFile().
        https://bugs.webkit.org/show_bug.cgi?id=33052

        The function should actually rewrite the given file to the buffer.

        This change fixes http/tests/plugins/post-url-file.html, which can be unskipped
        now along with other passing http/plugins tests.

        * plugins/qt/PluginViewQt.cpp:
        (WebCore::PluginView::handlePostReadFile):
2009-12-30  Jakub Wieczorek  <faw217@gmail.com>

        Reviewed by Simon Hausmann.

        [Qt] Fix PluginView::handlePostReadFile().
        https://bugs.webkit.org/show_bug.cgi?id=33052

        The function should actually rewrite the given file to the buffer.

        This change fixes http/tests/plugins/post-url-file.html, which can be unskipped
        now along with other passing http/plugins tests.

        * platform/qt/Skipped:


Canonical link: https://commits.webkit.org/44073@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@52660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Dec 30, 2009
1 parent f3ffd75 commit 6669224
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 7 deletions.
14 changes: 14 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
2009-12-30 Jakub Wieczorek <faw217@gmail.com>

Reviewed by Simon Hausmann.

[Qt] Fix PluginView::handlePostReadFile().
https://bugs.webkit.org/show_bug.cgi?id=33052

The function should actually rewrite the given file to the buffer.

This change fixes http/tests/plugins/post-url-file.html, which can be unskipped
now along with other passing http/plugins tests.

* platform/qt/Skipped:

2009-12-30 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Skipping isolatedWorld test - we still do not support that.
Expand Down
4 changes: 3 additions & 1 deletion LayoutTests/platform/qt/Skipped
Expand Up @@ -21,7 +21,6 @@ http/tests/globalhistory
http/tests/history
http/tests/incremental
http/tests/media
http/tests/plugins
http/tests/webarchive
http/tests/wml

Expand All @@ -35,6 +34,9 @@ http/tests/loading/redirect-methods.html
http/tests/loading/simple-subframe.html
http/tests/loading/text-content-type-with-binary-extension.html

# Failing plugins tests
http/tests/plugins/npapi-response-headers.html

# Failing Local tests
http/tests/local/drag-over-remote-content.html
http/tests/local/send-dragged-file.html
Expand Down
15 changes: 15 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,18 @@
2009-12-30 Jakub Wieczorek <faw217@gmail.com>

Reviewed by Simon Hausmann.

[Qt] Fix PluginView::handlePostReadFile().
https://bugs.webkit.org/show_bug.cgi?id=33052

The function should actually rewrite the given file to the buffer.

This change fixes http/tests/plugins/post-url-file.html, which can be unskipped
now along with other passing http/plugins tests.

* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::handlePostReadFile):

2009-12-30 Holger Hans Peter Freyther <zecke@selfish.org>

Rubber stamped by Simon Hausmann.
Expand Down
10 changes: 4 additions & 6 deletions WebCore/plugins/qt/PluginViewQt.cpp
Expand Up @@ -529,18 +529,16 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c
if (filename.startsWith("file:///"))
filename = filename.substring(8);

if (!fileExists(filename))
long long size;
if (!getFileSize(filename, size))
return NPERR_FILE_NOT_FOUND;

// FIXME - read the file data into buffer
FILE* fileHandle = fopen((filename.utf8()).data(), "r");

if (!fileHandle)
return NPERR_FILE_NOT_FOUND;

//buffer.resize();

int bytesRead = fread(buffer.data(), 1, 0, fileHandle);
buffer.resize(size);
int bytesRead = fread(buffer.data(), 1, size, fileHandle);

fclose(fileHandle);

Expand Down

0 comments on commit 6669224

Please sign in to comment.