electron/patches/common/chromium/webview_cross_drag.patch
2019-01-22 10:32:03 -08:00

30 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:47:04 -0700
Subject: webview_cross_drag.patch
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 12d8f9bd7cc569f977d8c98608a1a7ee5eaf9844..45cb5a3b0d457f8a0b0ed196d45e665e332a55ed 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -620,6 +620,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
bool WebContentsViewAura::IsValidDragTarget(
RenderWidgetHostImpl* target_rwh) const {
+ return true;
return target_rwh->GetProcess()->GetID() == drag_start_process_id_ ||
GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
drag_start_view_id_;
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 5bb3b17f12f5b97c50b557782c284fc4b7a2eef5..9f900db28b5c219c6d075f9963499f20d5b49196 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -349,6 +349,7 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint
}
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
+ return YES;
return targetRWH->GetProcess()->GetID() == dragStartProcessID_ ||
GetRenderViewHostID(webContents_->GetRenderViewHost()) !=
dragStartViewID_;