summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:54:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:54:08 +0000
commit7443e3d6139ce4f0c822c23d1efb9c097419456d (patch)
tree8e2682b680f95eb05e7f15551464dd1a671b06e2 /widget
parentReleasing progress-linux version 125.0.2-1~progress7.99u1. (diff)
downloadfirefox-7443e3d6139ce4f0c822c23d1efb9c097419456d.tar.xz
firefox-7443e3d6139ce4f0c822c23d1efb9c097419456d.zip
Merging upstream version 125.0.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget')
-rw-r--r--widget/gtk/nsDragService.cpp17
-rw-r--r--widget/gtk/nsDragService.h3
2 files changed, 12 insertions, 8 deletions
diff --git a/widget/gtk/nsDragService.cpp b/widget/gtk/nsDragService.cpp
index df0965b5e4..0135f97a4e 100644
--- a/widget/gtk/nsDragService.cpp
+++ b/widget/gtk/nsDragService.cpp
@@ -712,7 +712,7 @@ nsDragService::GetNumDropItems(uint32_t* aNumItems) {
*aNumItems = 0;
return NS_OK;
}
- GetTargetDragData(gdkFlavor, dragFlavors);
+ GetTargetDragData(gdkFlavor, dragFlavors, false /* resetTargetData */);
}
// application/vnd.portal.filetransfer
@@ -722,7 +722,7 @@ nsDragService::GetNumDropItems(uint32_t* aNumItems) {
*aNumItems = 0;
return NS_OK;
}
- GetTargetDragData(gdkFlavor, dragFlavors);
+ GetTargetDragData(gdkFlavor, dragFlavors, false /* resetTargetData */);
}
if (mTargetDragUris) {
@@ -875,7 +875,7 @@ nsDragService::GetData(nsITransferable* aTransferable, uint32_t aItemIndex) {
LOGDRAGSERVICE(" file not found, proceed with %s flavor\n", gPortalFile);
gdkFlavor = gdk_atom_intern(gPortalFile, FALSE);
if (gdkFlavor) {
- GetTargetDragData(gdkFlavor, dragFlavors);
+ GetTargetDragData(gdkFlavor, dragFlavors, false /* resetTargetData */);
GetReachableFileFromUriList(mTargetDragUris.get(), aItemIndex, file);
}
}
@@ -886,7 +886,7 @@ nsDragService::GetData(nsITransferable* aTransferable, uint32_t aItemIndex) {
gPortalFileTransfer);
gdkFlavor = gdk_atom_intern(gPortalFileTransfer, FALSE);
if (gdkFlavor) {
- GetTargetDragData(gdkFlavor, dragFlavors);
+ GetTargetDragData(gdkFlavor, dragFlavors, false /* resetTargetData */);
GetReachableFileFromUriList(mTargetDragUris.get(), aItemIndex, file);
}
}
@@ -899,7 +899,7 @@ nsDragService::GetData(nsITransferable* aTransferable, uint32_t aItemIndex) {
gdkFlavor = gdk_atom_intern(gTextUriListType, FALSE);
if (gdkFlavor) {
- GetTargetDragData(gdkFlavor, dragFlavors);
+ GetTargetDragData(gdkFlavor, dragFlavors, false /* resetTargetData */);
GetReachableFileFromUriList(mTargetDragUris.get(), aItemIndex, file);
}
}
@@ -1290,13 +1290,16 @@ bool nsDragService::IsTargetContextList(void) {
// DispatchMotionEvents().
// Can lead to another round of drag_motion events.
void nsDragService::GetTargetDragData(GdkAtom aFlavor,
- nsTArray<nsCString>& aDropFlavors) {
+ nsTArray<nsCString>& aDropFlavors,
+ bool aResetTargetData) {
LOGDRAGSERVICE("nsDragService::GetTargetDragData(%p) '%s'\n",
mTargetDragContext.get(),
GUniquePtr<gchar>(gdk_atom_name(aFlavor)).get());
// reset our target data areas
- TargetResetData();
+ if (aResetTargetData) {
+ TargetResetData();
+ }
GUniquePtr<gchar> name(gdk_atom_name(aFlavor));
nsDependentCString flavor(name.get());
diff --git a/widget/gtk/nsDragService.h b/widget/gtk/nsDragService.h
index 8a45b7b8ed..bb5da26cd4 100644
--- a/widget/gtk/nsDragService.h
+++ b/widget/gtk/nsDragService.h
@@ -207,7 +207,8 @@ class nsDragService final : public nsBaseDragService, public nsIObserver {
bool IsTargetContextList(void);
// this will get the native data from the last target given a
// specific flavor
- void GetTargetDragData(GdkAtom aFlavor, nsTArray<nsCString>& aDropFlavors);
+ void GetTargetDragData(GdkAtom aFlavor, nsTArray<nsCString>& aDropFlavors,
+ bool aResetTargetData = true);
// this will reset all of the target vars
void TargetResetData(void);
// Ensure our data cache belongs to aDragContext and clear the cache if