Skip to content

Commit

Permalink
Merge r265650 - [GTK4] Notify the web process on drag leave
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=215373

Reviewed by Adrian Perez de Castro.

We missed this when implemented drag and drop support for GTK4.

* UIProcess/API/gtk/DropTargetGtk4.cpp:
(WebKit::DropTarget::leave): Call dragExited() and resetCurrentDragInformation() on WebPageProxy.
  • Loading branch information
carlosgcampos committed Aug 14, 2020
1 parent fbc3345 commit 260c5aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,15 @@
2020-08-13 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK4] Notify the web process on drag leave
https://bugs.webkit.org/show_bug.cgi?id=215373

Reviewed by Adrian Perez de Castro.

We missed this when implemented drag and drop support for GTK4.

* UIProcess/API/gtk/DropTargetGtk4.cpp:
(WebKit::DropTarget::leave): Call dragExited() and resetCurrentDragInformation() on WebPageProxy.

2020-08-13 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Do not accept drag operations when the matched target list is empty
Expand Down
9 changes: 9 additions & 0 deletions Source/WebKit/UIProcess/API/gtk/DropTargetGtk4.cpp
Expand Up @@ -290,6 +290,15 @@ void DropTarget::didPerformAction()
void DropTarget::leave()
{
g_cancellable_cancel(m_cancellable.get());

auto* page = webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(m_webView));
ASSERT(page);

auto position = m_position.valueOr(IntPoint());
DragData dragData(&m_selectionData.value(), position, position, { });
page->dragExited(dragData);
page->resetCurrentDragInformation();

m_drop = nullptr;
m_position = WTF::nullopt;
m_selectionData = WTF::nullopt;
Expand Down

0 comments on commit 260c5aa

Please sign in to comment.