ma1 pushed to branch tor-browser-115.18.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits: f703416b by Gijs Kruitbosch at 2024-11-20T13:05:17+01:00 Bug 1842187 a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D223948
Differential Revision: https://phabricator.services.mozilla.com/D228631 - - - - - 5e64483b by Edgar Chen at 2024-11-22T17:14:16+01:00 Bug 1909535 - Don't show select dropdown in background tabs; a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D225706
Differential Revision: https://phabricator.services.mozilla.com/D227607 - - - - - 36cabf84 by Marco Bonardo at 2024-11-22T20:11:33+01:00 Bug 1921458. a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D226775
Differential Revision: https://phabricator.services.mozilla.com/D227221 - - - - -
6 changed files:
- toolkit/actors/SelectParent.sys.mjs - toolkit/components/downloads/DownloadUIHelper.sys.mjs - toolkit/components/reputationservice/ApplicationReputation.cpp - toolkit/components/reputationservice/test/gtest/TestExecutableLists.cpp - xpcom/io/nsLocalFileCommon.cpp - xpcom/io/nsLocalFileCommon.h
Changes:
===================================== toolkit/actors/SelectParent.sys.mjs ===================================== @@ -278,6 +278,31 @@ export var SelectParentHelper = { },
open(browser, menulist, rect, isOpenedViaTouch, selectParentActor) { + const canOpen = (() => { + if (!menulist.ownerDocument.hasFocus()) { + // Don't open in inactive browser windows. + return false; + } + if (browser) { + if (!browser.browsingContext.isActive) { + // Don't open in inactive tabs. + return false; + } + let tabbrowser = browser.getTabBrowser(); + if (tabbrowser && tabbrowser.selectedBrowser != browser) { + // AsyncTabSwitcher might delay activating our browser, check + // explicitly for tabbrowser. + return false; + } + } + return true; + })(); + + if (!canOpen) { + selectParentActor.sendAsyncMessage("Forms:DismissedDropDown", {}); + return; + } + this._actor = selectParentActor; menulist.hidden = false; this._currentBrowser = browser;
===================================== toolkit/components/downloads/DownloadUIHelper.sys.mjs ===================================== @@ -175,7 +175,10 @@ DownloadPrompter.prototype = { "download-ui-file-executable-security-warning", { executable: PathUtils.filename(path) } ); - return this._prompter.confirm(title, message); + let flags = + Ci.nsIPrompt.BUTTON_DELAY_ENABLE | Ci.nsIPrompt.STD_OK_CANCEL_BUTTONS; + let nulls = Array(4).fill(null); + return 0 == this._prompter.confirmEx(title, message, flags, ...nulls, {}); },
/**
===================================== toolkit/components/reputationservice/ApplicationReputation.cpp ===================================== @@ -291,6 +291,7 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = { //".jse", exec // JScript ".ksh", // Linux shell //".lha", + //".library-ms", exec // Windows //".lnk", exec // Windows ".local", // Windows //".lpaq1",
===================================== toolkit/components/reputationservice/test/gtest/TestExecutableLists.cpp ===================================== @@ -121,6 +121,7 @@ static const char* const kTestFileExtensions[] = { ".js", // JavaScript script ".jse", // JScript ".ksh", // Linux shell + ".library-ms", // Windows Library Files ".lnk", // Windows ".local", // Windows ".mad", // MS Access
===================================== xpcom/io/nsLocalFileCommon.cpp ===================================== @@ -72,6 +72,7 @@ const char* const sExecutableExts[] = { #endif ".js", ".jse", + ".library-ms", // Windows Library Files ".lnk", ".mad", // Access Module Shortcut ".maf", // Access
===================================== xpcom/io/nsLocalFileCommon.h ===================================== @@ -8,9 +8,9 @@ #define _NS_LOCAL_FILE_COMMON_H_
#ifdef MOZ_ESR -extern const char* const sExecutableExts[108]; -#else extern const char* const sExecutableExts[109]; +#else +extern const char* const sExecutableExts[110]; #endif
#endif
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/75c944d...
tor-commits@lists.torproject.org