From 5379da62a55cd0bc65a3b20998f9ff8176fa38e8 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Mon, 25 Aug 2014 10:25:47 +0000 Subject: [PATCH] Merge r172592 - WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view https://bugs.webkit.org/show_bug.cgi?id=127576 Patch by Michael Catanzaro on 2014-08-14 Reviewed by Carlos Garcia Campos. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): Assume read access to any file that has been dragged into the web view when compiling for GTK, since we don't support sandbox extensions. --- Source/WebKit2/ChangeLog | 12 ++++++++++++ Source/WebKit2/UIProcess/WebPageProxy.cpp | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index c5b2ab2156114..5aeda7adba225 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,15 @@ +2014-08-14 Michael Catanzaro + + WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view + https://bugs.webkit.org/show_bug.cgi?id=127576 + + Reviewed by Carlos Garcia Campos. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::performDragControllerAction): Assume read access + to any file that has been dragged into the web view when compiling for + GTK, since we don't support sandbox extensions. + 2014-08-21 Víctor Manuel Jáquez Leal [GTK] WebkitWebProcess crashing navigating away from ogg video element diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp index fc7eec46acbbe..5bfee5c0e4540 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp @@ -1102,6 +1102,9 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag if (!isValid()) return; #if PLATFORM(GTK) + String url = dragData.asURL(nullptr); + if (!url.isEmpty()) + m_process->assumeReadAccessToBaseURL(url); m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData), m_pageID); #else m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), dragStorageName, dragData.flags(), sandboxExtensionHandle, sandboxExtensionsForUpload), m_pageID);