Bug 39465 - [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt
Summary: [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 39459
Blocks: 30623
  Show dependency treegraph
 
Reported: 2010-05-20 18:34 PDT by Martin Robinson
Modified: 2010-05-27 01:03 PDT (History)
1 user (show)

See Also:


Attachments
Patch for this issue (4.94 KB, patch)
2010-05-20 18:37 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (5.45 KB, patch)
2010-05-22 12:04 PDT, 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-05-20 18:34:19 PDT
This is required so that the DOM can process dragEnd events.
Comment 1 Martin Robinson 2010-05-20 18:37:26 PDT
Created attachment 56656 [details]
Patch for this issue

I've attached a patch for this issue.
Comment 2 Xan Lopez 2010-05-22 01:42:47 PDT
Comment on attachment 56656 [details]
Patch for this issue

>+        [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt
>+        https://bugs.webkit.org/show_bug.cgi?id=39465

Why should it call it? What happens if you don't? Just because of the names it makes sense, but we should explain it in the ChangeLog.

>+    event->button.window = static_cast<GdkWindow*>(g_object_ref(
>+        gdk_display_get_window_at_pointer(display, &x, &y)));

I think the style is to let lines be as long as needed.

>+    event->button.x = x;
>+    event->button.y = y;
>+    event->button.x_root = xRoot;
>+    event->button.y_root = yRoot;
>+    event->button.state = modifiers;
>+
>+    PlatformMouseEvent platformEvent(&event->button);
>+    frame->eventHandler()->dragSourceEndedAt(platformEvent,
>+        gdkDragActionToDragOperation(context->action));

Same.

r- for missing rationale and because I'm feeling evil.
Comment 3 Xan Lopez 2010-05-22 01:46:08 PDT
Comment on attachment 56656 [details]
Patch for this issue

Bah, sorry, the explanation actually was in the ChangeLog, just inlined in the function mention. My apologies. r=me
Comment 4 Martin Robinson 2010-05-22 12:04:57 PDT
Created attachment 56784 [details]
Patch
Comment 5 Martin Robinson 2010-05-22 12:06:36 PDT
(In reply to comment #3)
> (From update of attachment 56656 [details])
> Bah, sorry, the explanation actually was in the ChangeLog, just inlined in the function mention. My apologies. r=me

I think you're right in that it could be expanded a bit. I've done that above
and removed the newlines as you've asked. I'll commit the patch that I just
posted. Thanks for the review. :)
Comment 6 Martin Robinson 2010-05-22 12:12:55 PDT
Committed r60010: <http://trac.webkit.org/changeset/60010>
Comment 7 Martin Robinson 2010-05-27 01:03:59 PDT
Comment on attachment 56784 [details]
Patch

Clearing flags, as this has landed.