зеркало из https://github.com/electron/electron.git
40 строки
1.8 KiB
Diff
40 строки
1.8 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
|
|
|
|
This allows dragging and dropping between <webview>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 c313a006efecdea4520e74c3bff527ef987c1be5..433874c3d2de7a68a7fc0893719408fb566b0d66 100644
|
|
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
|
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
|
@@ -789,9 +789,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 a964f38b830f62bf694646033e1c24e0cf4557c5..61e69fdebaca038d09b5ebab71fd20e2e13188f0 100644
|
|
--- a/content/browser/web_contents/web_drag_dest_mac.mm
|
|
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
|
|
@@ -384,9 +384,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
|
|
}
|
|
|
|
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
|
|
- return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
|
|
- GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
|
|
- _dragStartViewID;
|
|
+ return YES;
|
|
}
|
|
|
|
@end
|