Bug 666574: Advanced pref pane shouldn't use setBoolPref. r=mano
authorSteffen Wilberg <steffen.wilberg@web.de>
Sat, 25 Jun 2011 09:56:15 +0200
changeset 71737 28e4374838c43d6ce192380dd9136b8ca2b84d62
parent 71736 8be930c2f3c2a361e6e2e1001ebfebb3cb6ad456
child 71738 fc776fa4afb78d940418997eab4a958c6a5a4d48
push id241
push usersteffen.wilberg@web.de
push dateSat, 25 Jun 2011 07:56:56 +0000
treeherdermozilla-inbound@28e4374838c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmano
bugs666574
milestone7.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 666574: Advanced pref pane shouldn't use setBoolPref. r=mano
browser/components/preferences/advanced.js
browser/components/preferences/advanced.xul
--- a/browser/components/preferences/advanced.js
+++ b/browser/components/preferences/advanced.js
@@ -34,17 +34,16 @@
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 // Load DownloadUtils module for convertByteUnits
 Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
 
 var gAdvancedPane = {
   _inited: false,
 
   /**
    * Brings the appropriate tab to the front and initializes various bits of UI.
    */
   init: function ()
@@ -174,18 +173,19 @@ var gAdvancedPane = {
 
   /**
    * When the user toggles the layers.acceleration.disabled pref,
    * sync its new value to the gfx.direct2d.disabled pref too.
    */
   updateHardwareAcceleration: function()
   {
 #ifdef XP_WIN
-    var pref = document.getElementById("layers.acceleration.disabled");
-    Services.prefs.setBoolPref("gfx.direct2d.disabled", !pref.value);
+    var fromPref = document.getElementById("layers.acceleration.disabled");
+    var toPref = document.getElementById("gfx.direct2d.disabled");
+    toPref.value = fromPref.value;
 #endif
   },
 
   // NETWORK TAB
 
   /*
    * Preferences:
    *
--- a/browser/components/preferences/advanced.xul
+++ b/browser/components/preferences/advanced.xul
@@ -65,16 +65,19 @@
       <preference id="accessibility.browsewithcaret"   name="accessibility.browsewithcaret"   type="bool"/>
       <preference id="accessibility.typeaheadfind"     name="accessibility.typeaheadfind"     type="bool"/>
       <preference id="accessibility.blockautorefresh"  name="accessibility.blockautorefresh"  type="bool"/>
 
       <preference id="general.autoScroll"              name="general.autoScroll"              type="bool"/>
       <preference id="general.smoothScroll"            name="general.smoothScroll"            type="bool"/>
       <preference id="layers.acceleration.disabled"    name="layers.acceleration.disabled"    type="bool"   inverted="true"
                   onchange="gAdvancedPane.updateHardwareAcceleration()"/>
+#ifdef XP_WIN
+      <preference id="gfx.direct2d.disabled"           name="gfx.direct2d.disabled"           type="bool"   inverted="true"/>
+#endif
       <preference id="layout.spellcheckDefault"        name="layout.spellcheckDefault"        type="int"/>
 
 #ifdef HAVE_SHELL_SERVICE
       <preference id="browser.shell.checkDefaultBrowser"
                   name="browser.shell.checkDefaultBrowser"
                   type="bool"/>
 
       <preference id="pref.general.disable_button.default_browser"