Bug 612373 - Remove Win version<7 code from setDesktopBackground. r=Standard8
authorIan Moody <moz-ian@perix.co.uk>
Wed, 27 Mar 2019 18:26:11 +0000
changeset 525256 b921a78c88737795ae259dbeedf962b93c6e1137
parent 525255 3d4f7e72dadb643ba57214bdf4a8cf6d1bbe217d
child 525257 f292291c4ef63711ad35c5be73a65d59f368eb8e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs612373
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 612373 - Remove Win version<7 code from setDesktopBackground. r=Standard8 Minimum supported version of Windows is 7 now, this is dead code. Differential Revision: https://phabricator.services.mozilla.com/D23335
browser/components/shell/content/setDesktopBackground.js
browser/components/shell/content/setDesktopBackground.xul
--- a/browser/components/shell/content/setDesktopBackground.js
+++ b/browser/components/shell/content/setDesktopBackground.js
@@ -25,25 +25,16 @@ var gSetBackground = {
     if (AppConstants.platform == "macosx") {
       document.documentElement.getButton("accept").hidden = true;
     }
     // Cap ratio to 4 so the dialog width doesn't get ridiculous. Highest
     // regular screens seem to be 32:9 (3.56) according to Wikipedia.
     let screenRatio = Math.min(this._screenWidth / this._screenHeight, 4);
     this._canvas.width = this._canvas.height * screenRatio;
 
-    if (AppConstants.platform == "win") {
-      // Hide fill + fit options if < Win7 since they don't work.
-      var version = Services.sysinfo.getProperty("version");
-      var isWindows7OrHigher = (parseFloat(version) >= 6.1);
-      if (!isWindows7OrHigher) {
-        document.getElementById("fillPosition").hidden = true;
-        document.getElementById("fitPosition").hidden = true;
-      }
-    }
     document.addEventListener("dialogaccept", function() { gSetBackground.setDesktopBackground(); });
     // make sure that the correct dimensions will be used
     setTimeout(function(self) {
       self.init(window.arguments[0], window.arguments[1]);
     }, 0, this);
   },
 
   init(aImage, aImageName) {
--- a/browser/components/shell/content/setDesktopBackground.xul
+++ b/browser/components/shell/content/setDesktopBackground.xul
@@ -44,18 +44,18 @@
       <label value="&position.label;"/>
       <menulist id="menuPosition"
                 label="&position.label;"
                 oncommand="gSetBackground.updatePosition();">
         <menupopup>
           <menuitem label="&center.label;"  value="CENTER"/>
           <menuitem label="&tile.label;"    value="TILE"/>
           <menuitem label="&stretch.label;" value="STRETCH"/>
-          <menuitem label="&fill.label;"    value="FILL" id="fillPosition"/>
-          <menuitem label="&fit.label;"     value="FIT"  id="fitPosition"/>
+          <menuitem label="&fill.label;"    value="FILL"/>
+          <menuitem label="&fit.label;"     value="FIT"/>
         </menupopup>
       </menulist>
       <spacer flex="1"/>
       <label value="&color.label;"/>
       <html:input id="desktopColor"
                   type="color"
                   onchange="gSetBackground.updateColor(this.value);"/> 
     </hbox>