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 b68f773406739d0db8bf4db892ff535ad91b50be..972fc06125deafcd0bf59c69a3e64ec4de6fd8fd 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -795,9 +795,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { bool WebContentsViewAura::IsValidDragTarget( RenderWidgetHostImpl* target_rwh) const { - return target_rwh->GetProcess()->GetID() == drag_start_process_id_ || - GetRenderViewHostID(web_contents_->GetRenderViewHost()) != - drag_start_view_id_; + 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 623179b59639da685c8d43a0a7fe10045ede5ebd..20a17f90d9da070438471726e048ba3cf49d8fdf 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -382,9 +382,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { - return targetRWH->GetProcess()->GetID() == _dragStartProcessID || - GetRenderViewHostID(_webContents->GetRenderViewHost()) != - _dragStartViewID; + return YES; } @end