[tbb-commits] [tor-browser] 16/43: Bug 1654787 - Allow disabling pinching from the command line. r=botond, a=RyanVM
gitolite role
git at cupani.torproject.org
Tue May 31 07:06:59 UTC 2022
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.10.0esr-11.0-1
in repository tor-browser.
commit 94439c11f1df5ca59a2658e864f19864fd3d04bc
Author: Mike Kaply <mozilla at kaply.com>
AuthorDate: Thu Apr 21 14:22:59 2022 +0000
Bug 1654787 - Allow disabling pinching from the command line. r=botond, a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D143768
---
browser/components/BrowserContentHandler.jsm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/browser/components/BrowserContentHandler.jsm b/browser/components/BrowserContentHandler.jsm
index 97417d86cd7fa..f08179f3e3ce6 100644
--- a/browser/components/BrowserContentHandler.jsm
+++ b/browser/components/BrowserContentHandler.jsm
@@ -373,6 +373,19 @@ nsBrowserContentHandler.prototype = {
if (cmdLine.handleFlag("kiosk", false)) {
gKiosk = true;
}
+ if (cmdLine.handleFlag("disable-pinch", false)) {
+ let defaults = Services.prefs.getDefaultBranch(null);
+ defaults.setBoolPref("apz.allow_zooming", false);
+ Services.prefs.lockPref("apz.allow_zooming");
+ defaults.setCharPref("browser.gesture.pinch.in", "");
+ Services.prefs.lockPref("browser.gesture.pinch.in");
+ defaults.setCharPref("browser.gesture.pinch.in.shift", "");
+ Services.prefs.lockPref("browser.gesture.pinch.in.shift");
+ defaults.setCharPref("browser.gesture.pinch.out", "");
+ Services.prefs.lockPref("browser.gesture.pinch.out");
+ defaults.setCharPref("browser.gesture.pinch.out.shift", "");
+ Services.prefs.lockPref("browser.gesture.pinch.out.shift");
+ }
if (cmdLine.handleFlag("browser", false)) {
openBrowserWindow(cmdLine, gSystemPrincipal);
cmdLine.preventDefault = true;
@@ -586,7 +599,9 @@ nsBrowserContentHandler.prototype = {
info += " --setDefaultBrowser Set this app as the default browser.\n";
info +=
" --first-startup Run post-install actions before opening a new window.\n";
- info += " --kiosk Start the browser in kiosk mode.\n";
+ info += " --kiosk Start the browser in kiosk mode.\n";
+ info +=
+ " --disable-pinch Disable touch-screen and touch-pad pinch gestures.\n";
return info;
},
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list