Changeset 60010 in webkit
- Timestamp:
- May 22, 2010 12:12:32 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60009 r60010 1 2010-05-22 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Xan Lopez. 4 5 [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt 6 https://bugs.webkit.org/show_bug.cgi?id=39465 7 8 Added a helper function for converting a GDK action bitmask into a DragOperation bitmask. 9 10 No new tests as behavior has not changed. 11 12 * platform/gtk/ClipboardUtilitiesGtk.cpp: 13 (WebCore::gdkDragActionToDragOperation): Added. 14 * platform/gtk/ClipboardUtilitiesGtk.h: 15 1 16 2010-05-22 Patrick Gansterer <paroga@paroga.com> 2 17 -
trunk/WebCore/platform/gtk/ClipboardUtilitiesGtk.cpp
r60008 r60010 39 39 return gdkAction; 40 40 } 41 42 DragOperation gdkDragActionToDragOperation(GdkDragAction gdkAction) 43 { 44 unsigned int action = DragOperationNone; 45 if (gdkAction & GDK_ACTION_COPY) 46 action |= DragOperationCopy; 47 if (gdkAction & GDK_ACTION_MOVE) 48 action |= DragOperationMove; 49 if (gdkAction & GDK_ACTION_LINK) 50 action |= DragOperationLink; 51 if (gdkAction & GDK_ACTION_PRIVATE) 52 action |= DragOperationPrivate; 53 return static_cast<DragOperation>(action); 41 54 } 55 56 } -
trunk/WebCore/platform/gtk/ClipboardUtilitiesGtk.h
r60008 r60010 26 26 27 27 GdkDragAction dragOperationToGdkDragActions(DragOperation); 28 DragOperation gdkDragActionToDragOperation(GdkDragAction); 28 29 29 30 } -
trunk/WebKit/gtk/ChangeLog
r60008 r60010 1 2010-05-22 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Xan Lopez. 4 5 [GTK] webkit_web_view_drag_end should call EventHandler::dragSourceEndedAt 6 https://bugs.webkit.org/show_bug.cgi?id=39465 7 8 Properly call EventHandler::dragSourceEndedAt so that dragEnd events are processed in the DOM. 9 dragSourceEndedAt is responsible for calling the dragEnd DOM event as well as cleaning up assets 10 (such as the Clipboard) associated with the drag source. 11 12 * webkit/webkitwebview.cpp: 13 (webkit_web_view_drag_end): Remember to call dragSourceEndedAt here. 14 1 15 2010-05-22 Martin Robinson <mrobinson@igalia.com> 2 16 -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r59935 r60010 45 45 #include "Cache.h" 46 46 #include "ChromeClientGtk.h" 47 #include "ClipboardUtilitiesGtk.h" 47 48 #include "ContextMenuClientGtk.h" 48 49 #include "ContextMenuController.h" … … 1237 1238 static void webkit_web_view_drag_end(GtkWidget* widget, GdkDragContext* context) 1238 1239 { 1239 WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(WEBKIT_WEB_VIEW(widget)); 1240 WebKitWebView* webView = WEBKIT_WEB_VIEW(widget); 1241 WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(webView); 1240 1242 1241 1243 // This might happen if a drag is still in progress after a WebKitWebView 1242 // is di posed and before it is finalized.1244 // is disposed and before it is finalized. 1243 1245 if (!priv->draggingDataObjects.contains(context)) 1244 1246 return; 1245 1247 1246 1248 priv->draggingDataObjects.remove(context); 1249 1250 Frame* frame = core(webView)->focusController()->focusedOrMainFrame(); 1251 if (!frame) 1252 return; 1253 1254 GdkEvent* event = gdk_event_new(GDK_BUTTON_RELEASE); 1255 int x, y, xRoot, yRoot; 1256 GdkModifierType modifiers; 1257 GdkDisplay* display = gdk_display_get_default(); 1258 gdk_display_get_pointer(display, 0, &xRoot, &yRoot, &modifiers); 1259 1260 event->button.window = static_cast<GdkWindow*>(g_object_ref(gdk_display_get_window_at_pointer(display, &x, &y))); 1261 event->button.x = x; 1262 event->button.y = y; 1263 event->button.x_root = xRoot; 1264 event->button.y_root = yRoot; 1265 event->button.state = modifiers; 1266 1267 PlatformMouseEvent platformEvent(&event->button); 1268 frame->eventHandler()->dragSourceEndedAt(platformEvent, gdkDragActionToDragOperation(context->action)); 1269 1270 gdk_event_free(event); 1247 1271 } 1248 1272
Note: See TracChangeset
for help on using the changeset viewer.