Skip to content

Commit

Permalink
Bug 1846845 - Remove some unneeded isPlatformAndVersionAtLeast checks…
Browse files Browse the repository at this point in the history
… r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D185221
  • Loading branch information
gregorypappas committed Aug 2, 2023
1 parent 7653914 commit 31e3d8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 5 additions & 5 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ var gBrowserInit = {

FullScreen.init();

if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
if (AppConstants.platform == "win") {
MenuTouchModeObserver.init();
}

Expand Down Expand Up @@ -2492,7 +2492,7 @@ var gBrowserInit = {
);
Services.obs.removeObserver(gKeywordURIFixup, "keyword-uri-fixup");

if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
if (AppConstants.platform == "win") {
MenuTouchModeObserver.uninit();
}
BrowserOffline.uninit();
Expand Down Expand Up @@ -6557,14 +6557,14 @@ function updateToggleControlLabel(control) {

var TabletModeUpdater = {
init() {
if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
if (AppConstants.platform == "win") {
this.update(WindowsUIUtils.inTabletMode);
Services.obs.addObserver(this, "tablet-mode-change");
}
},

uninit() {
if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
if (AppConstants.platform == "win") {
Services.obs.removeObserver(this, "tablet-mode-change");
}
},
Expand Down Expand Up @@ -6653,7 +6653,7 @@ var gUIDensity = {
getCurrentDensity() {
// Automatically override the uidensity to touch in Windows tablet mode.
if (
AppConstants.isPlatformAndVersionAtLeast("win", "10") &&
AppConstants.platform == "win" &&
WindowsUIUtils.inTabletMode &&
Services.prefs.getBoolPref(this.autoTouchModePref)
) {
Expand Down
2 changes: 1 addition & 1 deletion browser/components/BrowserContentHandler.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ nsDefaultCommandLineHandler.prototype = {
}
} else if (!cmdLine.preventDefault) {
if (
AppConstants.isPlatformAndVersionAtLeast("win", "10") &&
AppConstants.platform == "win" &&
cmdLine.state != Ci.nsICommandLine.STATE_INITIAL_LAUNCH &&
lazy.WindowsUIUtils.inTabletMode
) {
Expand Down
6 changes: 0 additions & 6 deletions toolkit/content/aboutSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ var snapshotFormatters = {
},

securitySoftware(data) {
if (!AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
$("security-software").hidden = true;
$("security-software-table").hidden = true;
return;
}

$("security-software-antivirus").textContent = data.registeredAntiVirus;
$("security-software-antispyware").textContent = data.registeredAntiSpyware;
$("security-software-firewall").textContent = data.registeredFirewall;
Expand Down

0 comments on commit 31e3d8a

Please sign in to comment.