-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa1485c
commit 0c80a05
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
chromium_src/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* Copyright (c) 2022 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "third_party/blink/renderer/modules/clipboard/clipboard_promise.h" | ||
|
||
#define BRAVE_CLIPBOARD_PROMISE_REQUEST_PERMISSION \ | ||
false); \ | ||
if ( | ||
|
||
#include "src/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc" | ||
#undef BRAVE_CLIPBOARD_PROMISE_REQUEST_PERMISSION |
12 changes: 12 additions & 0 deletions
12
patches/third_party-blink-renderer-modules-clipboard-clipboard_promise.cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc | ||
index 232be5f18146d7e54aa41c34fb2f1d4da97c261a..5d678d5c4d57faedf507543939b958bd5ca4c6b4 100644 | ||
--- a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc | ||
+++ b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc | ||
@@ -550,6 +550,7 @@ void ClipboardPromise::RequestPermission( | ||
// Currently NTP relies on readText & writeText to be called without any user | ||
// gesture. | ||
if (allow_without_sanitization && | ||
+ BRAVE_CLIPBOARD_PROMISE_REQUEST_PERMISSION | ||
RuntimeEnabledFeatures::ClipboardCustomFormatsEnabled() && | ||
!has_transient_user_activation) { | ||
script_promise_resolver_->Reject(MakeGarbageCollected<DOMException>( |