| 
									
										
										
										
											2018-10-24 11:24:11 -07:00
										 |  |  | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | 
					
						
							| 
									
										
										
										
											2018-09-20 17:30:26 -07:00
										 |  |  | From: Anonymous <anonymous@electronjs.org> | 
					
						
							|  |  |  | Date: Thu, 20 Sep 2018 17:47:04 -0700 | 
					
						
							|  |  |  | Subject: webview_cross_drag.patch | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 09:18:45 -08:00
										 |  |  | This allows dragging and dropping between <webview>s. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Originally landed in https://github.com/electron/libchromiumcontent/pull/267 | 
					
						
							| 
									
										
										
										
											2018-09-20 17:30:26 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 |  |  | diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
 | 
					
						
							| 
									
										
										
										
											2020-01-29 04:01:37 -08:00
										 |  |  | index 44bc4902a374821eecebf72bfcb150b7d86db621..c570fadb559230e17440c64b9042fbd9e73a910c 100644
 | 
					
						
							| 
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 |  |  | --- a/content/browser/web_contents/web_contents_view_aura.cc
 | 
					
						
							|  |  |  | +++ b/content/browser/web_contents/web_contents_view_aura.cc
 | 
					
						
							| 
									
										
										
										
											2020-01-29 04:01:37 -08:00
										 |  |  | @@ -792,6 +792,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
 | 
					
						
							| 
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 |  |  |   | 
					
						
							|  |  |  |  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
 | 
					
						
							| 
									
										
										
										
											2020-01-29 04:01:37 -08:00
										 |  |  | index b35ff2edf854aa759a91fa708ed560d2f269e078..4ca6119b2105f27cabcb664d9ba7631973b49966 100644
 | 
					
						
							| 
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 |  |  | --- a/content/browser/web_contents/web_drag_dest_mac.mm
 | 
					
						
							|  |  |  | +++ b/content/browser/web_contents/web_drag_dest_mac.mm
 | 
					
						
							| 
									
										
										
										
											2020-01-29 04:01:37 -08:00
										 |  |  | @@ -337,6 +337,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
 | 
					
						
							| 
									
										
										
										
											2018-09-13 22:02:16 -07:00
										 |  |  |  } | 
					
						
							|  |  |  |   | 
					
						
							|  |  |  |  - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { | 
					
						
							|  |  |  | +  return YES;
 | 
					
						
							| 
									
										
										
										
											2019-12-13 15:13:12 -05:00
										 |  |  |    return targetRWH->GetProcess()->GetID() == _dragStartProcessID || | 
					
						
							|  |  |  |           GetRenderViewHostID(_webContents->GetRenderViewHost()) != | 
					
						
							|  |  |  |               _dragStartViewID; |