From b6df9ad0273517701358402a8920aeb64710cf4c Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sat, 28 Sep 2019 21:09:18 +0000 Subject: [PATCH] Merge mozilla-central to fx-team to pick up the #1 top orange fix UltraBlame original commit: b7d0f477f873814e06c9b77e60264788f582ec44 --- browser/base/content/urlbarBindings.xml | 4 ++-- browser/components/nsBrowserGlue.js | 13 ++++++------- browser/devtools/webconsole/HUDService.jsm | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index f16d12590259..f000cab8b8a0 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -550,7 +550,7 @@ Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper) - .copyString(val); + .copyString(val, document); }, supportsCommand: function(aCommand) { switch (aCommand) { @@ -753,7 +753,7 @@ Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper) - .copyStringToClipboard(val, Ci.nsIClipboard.kSelectionClipboard); + .copyStringToClipboard(val, document, Ci.nsIClipboard.kSelectionClipboard); ]]> diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 95a256c23b29..041ab4997a0d 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -492,13 +492,6 @@ BrowserGlue.prototype = { if (!aQuitType) aQuitType = "quit"; - - var inPrivateBrowsing = Cc["@mozilla.org/privatebrowsing;1"]. - getService(Ci.nsIPrivateBrowsingService). - privateBrowsingEnabled; - if (inPrivateBrowsing) - return; - var showPrompt = false; var mostRecentBrowserWindow; @@ -530,6 +523,12 @@ BrowserGlue.prototype = { return; } + var inPrivateBrowsing = Cc["@mozilla.org/privatebrowsing;1"]. + getService(Ci.nsIPrivateBrowsingService). + privateBrowsingEnabled; + if (inPrivateBrowsing) + return; + if (!showPrompt) return; diff --git a/browser/devtools/webconsole/HUDService.jsm b/browser/devtools/webconsole/HUDService.jsm index cd8f53b79684..ed023af94c15 100644 --- a/browser/devtools/webconsole/HUDService.jsm +++ b/browser/devtools/webconsole/HUDService.jsm @@ -1012,7 +1012,7 @@ HUD_SERVICE.prototype = strings.push("[" + timestampString + "] " + item.clipboardText); } } - clipboardHelper.copyString(strings.join("\n")); + clipboardHelper.copyString(strings.join("\n"), this.doc); } };