summaryrefslogtreecommitdiffstats
path: root/widget/nsClipboardHelper.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /widget/nsClipboardHelper.cpp
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/nsClipboardHelper.cpp')
-rw-r--r--widget/nsClipboardHelper.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/widget/nsClipboardHelper.cpp b/widget/nsClipboardHelper.cpp
index 3439adef48..87e697a4c6 100644
--- a/widget/nsClipboardHelper.cpp
+++ b/widget/nsClipboardHelper.cpp
@@ -36,9 +36,10 @@ nsClipboardHelper::~nsClipboardHelper() {
*****************************************************************************/
NS_IMETHODIMP
-nsClipboardHelper::CopyStringToClipboard(const nsAString& aString,
- int32_t aClipboardID,
- SensitiveData aSensitive) {
+nsClipboardHelper::CopyStringToClipboard(
+ const nsAString& aString, int32_t aClipboardID,
+ mozilla::dom::WindowContext* aSettingWindowContext,
+ SensitiveData aSensitive) {
nsresult rv;
// get the clipboard
@@ -92,20 +93,22 @@ nsClipboardHelper::CopyStringToClipboard(const nsAString& aString,
NS_ENSURE_SUCCESS(rv, rv);
// put the transferable on the clipboard
- rv = clipboard->SetData(trans, nullptr, aClipboardID);
+ rv = clipboard->SetData(trans, nullptr, aClipboardID, aSettingWindowContext);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
NS_IMETHODIMP
-nsClipboardHelper::CopyString(const nsAString& aString,
- SensitiveData aSensitive) {
+nsClipboardHelper::CopyString(
+ const nsAString& aString,
+ mozilla::dom::WindowContext* aSettingWindowContext,
+ SensitiveData aSensitive) {
nsresult rv;
// copy to the global clipboard. it's bad if this fails in any way.
rv = CopyStringToClipboard(aString, nsIClipboard::kGlobalClipboard,
- aSensitive);
+ aSettingWindowContext, aSensitive);
NS_ENSURE_SUCCESS(rv, rv);
// unix also needs us to copy to the selection clipboard. this will
@@ -117,7 +120,8 @@ nsClipboardHelper::CopyString(const nsAString& aString,
// if this fails in any way other than "not being unix", we'll get
// the assertion we need in CopyStringToClipboard, and we needn't
// assert again here.
- CopyStringToClipboard(aString, nsIClipboard::kSelectionClipboard, aSensitive);
+ CopyStringToClipboard(aString, nsIClipboard::kSelectionClipboard,
+ aSettingWindowContext, aSensitive);
return NS_OK;
}