Bug 39465

Summary: [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 39459    
Bug Blocks: 30623    
Attachments:
Description Flags
Patch for this issue
none
Patch none

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.