[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
dbates at webkit.org
dbates at webkit.org
Thu Oct 29 20:42:14 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 96f7b3a93afd54f8c49ad28d333585e377f09142
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 9 02:10:44 2009 +0000
2009-10-08 Daniel Bates <dbates at webkit.org>
Reviewed by Adam Roben.
https://bugs.webkit.org/show_bug.cgi?id=30175
The Windows DRT equivalent of DoDragDrop (i.e. UIDelegate::doDragDrop) does not return
the OLE drag-and-drop return value like the function it emulates. Currently,
UIDelegate::doDragDrop returns a hard-coded S_OK. Hence, the caller cannot determine
whether the drag-and-drop operation was successful or was cancelled.
This patch fixes this issue by having UIDelegate::doDragDrop return the OLE drag-and-drop
return value according to whether the drop operation was successful or not.
* DumpRenderTree/win/EventSender.cpp:
(doMouseUp): Added parameter oleDragAndDropReturnValue.
(replaySavedEvents): Ditto.
* DumpRenderTree/win/EventSender.h:
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::doDragDrop): Modified to return OLE drag-and-drop return value.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 28d9583..a96d087 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2009-10-08 Daniel Bates <dbates at webkit.org>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30175
+
+ The Windows DRT equivalent of DoDragDrop (i.e. UIDelegate::doDragDrop) does not return
+ the OLE drag-and-drop return value like the function it emulates. Currently,
+ UIDelegate::doDragDrop returns a hard-coded S_OK. Hence, the caller cannot determine
+ whether the drag-and-drop operation was successful or was cancelled.
+
+ This patch fixes this issue by having UIDelegate::doDragDrop return the OLE drag-and-drop
+ return value according to whether the drop operation was successful or not.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (doMouseUp): Added parameter oleDragAndDropReturnValue.
+ (replaySavedEvents): Ditto.
+ * DumpRenderTree/win/EventSender.h:
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::doDragDrop): Modified to return OLE drag-and-drop return value.
+
2009-10-08 Alejandro G. Castro <alex at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.cpp b/WebKitTools/DumpRenderTree/win/EventSender.cpp
index 721b238..dd5bf9d 100644
--- a/WebKitTools/DumpRenderTree/win/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/win/EventSender.cpp
@@ -194,7 +194,7 @@ static inline POINTL pointl(const POINT& point)
return result;
}
-static void doMouseUp(MSG msg)
+static void doMouseUp(MSG msg, HRESULT* oleDragAndDropReturnValue = 0)
{
COMPtr<IWebFramePrivate> framePrivate;
if (SUCCEEDED(frame->QueryInterface(&framePrivate)))
@@ -215,6 +215,8 @@ static void doMouseUp(MSG msg)
didDragEnter = true;
}
HRESULT hr = draggingInfo->dropSource()->QueryContinueDrag(0, 0);
+ if (oleDragAndDropReturnValue)
+ *oleDragAndDropReturnValue = hr;
webViewDropTarget->DragOver(0, pointl(screenPoint), &effect);
if (hr == DRAGDROP_S_DROP && effect != DROPEFFECT_NONE) {
DWORD effect = 0;
@@ -314,7 +316,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
return JSValueMakeUndefined(context);
}
-void replaySavedEvents()
+void replaySavedEvents(HRESULT* oleDragAndDropReturnValue)
{
replayingSavedEvents = true;
@@ -326,7 +328,7 @@ void replaySavedEvents()
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
- doMouseUp(msg);
+ doMouseUp(msg, oleDragAndDropReturnValue);
break;
case WM_MOUSEMOVE:
doMouseMove(msg);
@@ -370,7 +372,7 @@ void replaySavedEvents()
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
- doMouseUp(msg);
+ doMouseUp(msg, oleDragAndDropReturnValue);
break;
case WM_MOUSEMOVE:
doMouseMove(msg);
diff --git a/WebKitTools/DumpRenderTree/win/EventSender.h b/WebKitTools/DumpRenderTree/win/EventSender.h
index 9ae0aec..79d7dab 100644
--- a/WebKitTools/DumpRenderTree/win/EventSender.h
+++ b/WebKitTools/DumpRenderTree/win/EventSender.h
@@ -31,11 +31,12 @@
class DraggingInfo;
+typedef long HRESULT;
typedef const struct OpaqueJSContext* JSContextRef;
typedef struct OpaqueJSValue* JSObjectRef;
JSObjectRef makeEventSender(JSContextRef context);
-void replaySavedEvents();
+void replaySavedEvents(HRESULT* oleDragAndDropReturnValue = 0);
extern DraggingInfo* draggingInfo;
diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
index b78fd3e..16724d7 100644
--- a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
+++ b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
@@ -502,13 +502,14 @@ HRESULT STDMETHODCALLTYPE UIDelegate::doDragDrop(
*performedEffect = 0;
draggingInfo = new DraggingInfo(object, source);
- replaySavedEvents();
+ HRESULT oleDragAndDropReturnValue = DRAGDROP_S_CANCEL;
+ replaySavedEvents(&oleDragAndDropReturnValue);
if (draggingInfo) {
*performedEffect = draggingInfo->performedDropEffect();
delete draggingInfo;
draggingInfo = 0;
}
- return S_OK;
+ return oleDragAndDropReturnValue;
}
HRESULT STDMETHODCALLTYPE UIDelegate::webViewGetDlgCode(
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list