From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 20 Sep 2018 17:47:04 -0700 Subject: webview_cross_drag.patch This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index d85232514f1a272e435489f7baecfa12b61288b8..07c20acd985351117edd270f65d9569c138742c4 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -919,10 +919,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. - bool cross_tab_drag = - GetRenderViewHostID(web_contents_->GetRenderViewHost()) != - drag_start_->view_id; - return cross_tab_drag; + return true; } //////////////////////////////////////////////////////////////////////////////// diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm index 4a7153d7b6e23c372c6f4dd4b5d02eb2ed372ca0..aa165434b4db9a4663e890a4729badb322832af2 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -386,9 +386,7 @@ - (void)resetDragStartTrackers { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { - return targetRWH->GetProcess()->GetID() == _dragStartProcessID || - GetRenderViewHostID(_webContents->GetRenderViewHost()) != - _dragStartViewID; + return YES; } @end