Bug 1893119: Part 3 - Add widget to nsContentUtils::GetDragSession r=gstoll,rkraesig
Updates each client of the nsContentUtils method to get the right drag session -- the one for the widget that is currently the source or target of the drag session. The change to nsDOMWindowUtils::DispatchDOMEventViaPresShellForTesting() supports the change to WidgetDragEvent::InitDropEffectForTests() and enabled a large number of test fixes in the next patch. Differential Revision: https://phabricator.services.mozilla.com/D211067
This commit is contained in:
@@ -3305,7 +3305,8 @@ mozilla::ipc::IPCResult ContentChild::RecvEndDragSession(
|
||||
nsCOMPtr<nsIDragService> dragService =
|
||||
do_GetService("@mozilla.org/widget/dragservice;1");
|
||||
if (dragService) {
|
||||
nsCOMPtr<nsIDragSession> dragSession = nsContentUtils::GetDragSession();
|
||||
nsCOMPtr<nsIDragSession> dragSession;
|
||||
dragService->GetCurrentSession(getter_AddRefs(dragSession));
|
||||
if (dragSession) {
|
||||
if (aUserCancelled) {
|
||||
dragSession->UserCancelled();
|
||||
|
||||
Reference in New Issue
Block a user