Bug 40833 - [GTK] The GTK+ EventSender needs support for beginDragWithFiles
Summary: [GTK] The GTK+ EventSender needs support for beginDragWithFiles
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 34246 (view as bug list)
Depends on: 40832 52097
Blocks: 52094 52090 52092 52096
  Show dependency treegraph
 
Reported: 2010-06-18 08:02 PDT by Martin Robinson
Modified: 2011-01-18 09:53 PST (History)
3 users (show)

See Also:


Attachments
proposed patch (6.12 KB, patch)
2010-11-19 05:50 PST, Adam Bergkvist
no flags Details | Formatted Diff | Diff
updated patch (6.12 KB, patch)
2010-11-19 08:23 PST, Adam Bergkvist
no flags Details | Formatted Diff | Diff
Patch (16.91 KB, patch)
2011-01-07 18:17 PST, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2010-06-18 08:02:48 PDT
This is required for a bunch of drag-and-drop tests to pass.
Comment 1 Martin Robinson 2010-09-10 08:46:43 PDT
*** Bug 34246 has been marked as a duplicate of this bug. ***
Comment 2 Adam Bergkvist 2010-11-19 05:50:37 PST
Created attachment 74376 [details]
proposed patch

The patch has been tested with LayoutTests/fast/files (requires building with --blob, see build fix https://bugs.webkit.org/show_bug.cgi?id=49724).
Comment 3 WebKit Review Bot 2010-11-19 05:52:20 PST
Attachment 74376 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--diff-files', u'WebKitTools/ChangeLog', u'WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp', u'WebKitTools/DumpRenderTree/gtk/EventSender.cpp', u'WebKitTools/DumpRenderTree/gtk/EventSender.h']" exit_code: 1
WebKitTools/DumpRenderTree/gtk/EventSender.cpp:421:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Adam Bergkvist 2010-11-19 08:23:35 PST
Created attachment 74393 [details]
updated patch

Fixed style error.
Comment 5 Martin Robinson 2010-11-19 09:21:08 PST
We should wait to land this about File support is implemented. After that I think we should unskip as many of the files that are failing in the Skipped list because of this issue that we can.
Comment 6 Martin Robinson 2011-01-07 18:17:37 PST
Created attachment 78296 [details]
Patch
Comment 7 Martin Robinson 2011-01-07 18:18:43 PST
I've merged my earlier work on this issue with Adam's patch and together we've  unskipped tests and organized the remaining failures. Attached is the result of that work.
Comment 8 Martin Robinson 2011-01-07 18:42:08 PST
Comment on attachment 78296 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=78296&action=review

> LayoutTests/platform/gtk/Skipped:5355
> +editing/pasteboard/file-drag-to-editable.html:

If everything else is okay, I can fix this broken Skipped line before landing.
Comment 9 Gustavo Noronha (kov) 2011-01-18 04:38:59 PST
Comment on attachment 78296 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=78296&action=review

Looks good!

> Tools/DumpRenderTree/gtk/EventSender.cpp:439
> +    GFile* testFile = g_file_new_for_uri(mainFrameURI);

We should be able to use GRefPtr here, since we're using GOwnPtr for the chars =)?

> Tools/DumpRenderTree/gtk/EventSender.cpp:452
> +        parentDirectory = g_file_new_for_path(currentDirectory.get());

You're leaking the parentDirectory returned by g_file_get_parent() here. Perhaps fix this just by using GRefPtr on it as well =).
Comment 10 Martin Robinson 2011-01-18 09:18:32 PST
(In reply to comment #9)
> You're leaking the parentDirectory returned by g_file_get_parent() here. Perhaps fix this just by using GRefPtr on it as well =).

Thanks for the review! I will fix these issues before landing by switching all raw GFile references to GRefPtr.
Comment 11 Martin Robinson 2011-01-18 09:52:16 PST
Committed r76031: <http://trac.webkit.org/changeset/76031>