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 bb9b9d0ce53ce427075fd92ab1da119c08f6e591..6792e64b2f0f4a5080beb57804f861d8297524d2 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -899,10 +899,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 dab3703cc4469802bae9e4d45c3e7d0f0857f577..ecd8af37c681ae5c97060af00bbeb8ebddb72b26 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -388,9 +388,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { - return targetRWH->GetProcess()->GetID() == _dragStartProcessID || - GetRenderViewHostID(_webContents->GetRenderViewHost()) != - _dragStartViewID; + return YES; } @end