Bug 30175 - [Win] Windows DRT UIDelegate::doDragDrop does not return OLE drag-and-drop return value
Summary: [Win] Windows DRT UIDelegate::doDragDrop does not return OLE drag-and-drop re...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-07 10:51 PDT by Daniel Bates
Modified: 2009-10-08 19:11 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.57 KB, patch)
2009-10-07 11:43 PDT, Daniel Bates
aroben: review-
Details | Formatted Diff | Diff
Patch (4.51 KB, patch)
2009-10-07 12:22 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2009-10-07 10:51:20 PDT
We should have UIDelegate::doDragDrop return the OLE drag-and-drop return value just like the Windows API function it emulates, DoDragDrop <http://msdn.microsoft.com/en-us/library/ms678486%28VS.85%29.aspx>.
Comment 1 Daniel Bates 2009-10-07 11:43:03 PDT
Created attachment 40808 [details]
Patch

No test included because it is not possible to test this outside of unit testing.
Comment 2 Adam Roben (:aroben) 2009-10-07 11:53:52 PDT
Comment on attachment 40808 [details]
Patch

> +++ WebKit/win/WebCoreSupport/WebDragClient.cpp	(working copy)
> @@ -161,11 +161,9 @@ void WebDragClient::startDrag(DragImageR
>          if (SUCCEEDED(m_webView->uiDelegate(&ui))) {
>              COMPtr<IWebUIDelegatePrivate> uiPrivate;
>              if (SUCCEEDED(ui->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate)))
> -                if (SUCCEEDED(uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect)))
> -                    return;
> -        }
> -
> -        DoDragDrop(dataObject.get(), source.get(), okEffect, &effect);
> +                uiPrivate->doDragDrop(m_webView, dataObject.get(), source.get(), okEffect, &effect);
> +        } else
> +            DoDragDrop(dataObject.get(), source.get(), okEffect, &effect);

I don't think this change is what we want. This will require that all WebKit clients that support the IWebUIDelegatePrivate interface implement doDragDrop. I think we want to leave this code as it was.

> +++ WebKitTools/DumpRenderTree/win/EventSender.h	(working copy)
> @@ -29,13 +29,15 @@
>  #ifndef EventSender_h
>  #define EventSender_h
>  
> +#include <windows.h>

It would be nicer to just forward-declare HRESULT.

The rest of the DRT changes look fine.
Comment 3 Daniel Bates 2009-10-07 12:22:51 PDT
Created attachment 40812 [details]
Patch

As per Adam's comment, removed changes to WebDragClient::startDrag and in EventSender defined typedef for HRESULT, instead of including <window.h>.
Comment 4 Adam Roben (:aroben) 2009-10-07 12:46:11 PDT
Comment on attachment 40812 [details]
Patch

r=me
Comment 5 Daniel Bates 2009-10-08 19:11:06 PDT
Comment on attachment 40812 [details]
Patch

Clearing flags on attachment: 40812

Committed r49336: <http://trac.webkit.org/changeset/49336>
Comment 6 Daniel Bates 2009-10-08 19:11:09 PDT
All reviewed patches have been landed.  Closing bug.