mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-22 15:07:42 +01:00
Merge revision 1066 changes:
- Linux: Fix drag/drop crash in WebCore::DragData::modifierKeyState (issue #875). git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1271@1068 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
279fca9e80
commit
c224c1aca4
@ -147,6 +147,17 @@ void WebDropTarget::OnDragLeave(GtkWidget* widget, GdkDragContext* context,
|
|||||||
guint time) {
|
guint time) {
|
||||||
context_ = NULL;
|
context_ = NULL;
|
||||||
drop_data_.reset();
|
drop_data_.reset();
|
||||||
|
|
||||||
|
// Sometimes we get a drag-leave event before getting a drag-data-received
|
||||||
|
// event. In that case, we don't want to bother the renderer with a
|
||||||
|
// DragLeave event.
|
||||||
|
if (data_requests_ != 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// When GTK sends us a drag-drop signal, it is shortly (and synchronously)
|
||||||
|
// preceded by a drag-leave. The renderer doesn't like getting the signals
|
||||||
|
// in this order so delay telling it about the drag-leave till we are sure
|
||||||
|
// we are not getting a drop as well.
|
||||||
MessageLoop::current()->PostTask(FROM_HERE,
|
MessageLoop::current()->PostTask(FROM_HERE,
|
||||||
base::Bind(&WebDropTarget::DragLeave, method_factory_.GetWeakPtr()));
|
base::Bind(&WebDropTarget::DragLeave, method_factory_.GetWeakPtr()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user