Skip to content

Commit

Permalink
Uplift of #14901 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Aug 31, 2022
1 parent aa1485c commit 0c80a05
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
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
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>(

0 comments on commit 0c80a05

Please sign in to comment.