summaryrefslogtreecommitdiffstats
path: root/webbrowser/components
diff options
context:
space:
mode:
Diffstat (limited to 'webbrowser/components')
-rw-r--r--webbrowser/components/nsBrowserGlue.js16
-rw-r--r--webbrowser/components/preferences/advanced.js8
-rw-r--r--webbrowser/components/preferences/advanced.xul26
3 files changed, 33 insertions, 17 deletions
diff --git a/webbrowser/components/nsBrowserGlue.js b/webbrowser/components/nsBrowserGlue.js
index 2383d8e..1b6cf92 100644
--- a/webbrowser/components/nsBrowserGlue.js
+++ b/webbrowser/components/nsBrowserGlue.js
@@ -1227,13 +1227,15 @@ BrowserGlue.prototype = {
}
#endif
+// Convert user preferences for future version changes section
+
if (currentUIVersion < 20) {
// HPKP change of UI preference; reset enforcement level
Services.prefs.clearUserPref("security.cert_pinning.eforcement_level");
}
if (currentUIVersion < 21) {
- //remove key4.db and cert9.db if those files exist
+ // remove key4.db and cert9.db if those files exist
// XXX: Remove this code block once we actually start using them.
let dsCertFile = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
@@ -1246,6 +1248,18 @@ if (currentUIVersion < 21) {
if (dsKeyFile.exists()) {
try { dsKeyFile.remove(false); } catch(e) {}
}
+
+ // Reset hardware accelleration settings now that UXP isn't blacklisting as much
+ if (Services.prefs.prefHasUserValue("layers.acceleration.disabled")) {
+ let HWADisabled = Service.prefs.getBoolPref("layers.acceleration.disabled");
+ Services.prefs.setBoolPref("layers.acceleration.enabled", !HWADisabled);
+ Services.prefs.setBoolPref("gfx.direct2d.disabled", HWADisabled);
+ }
+ if (Services.prefs.getBoolPref("layers.acceleration.force-enabled", false)) {
+ Services.prefs.setBoolPref("layers.acceleration.force", true);
+ }
+ Services.prefs.clearUserPref("layers.acceleration.disabled");
+ Services.prefs.clearUserPref("layers.acceleration.force-enabled");
}
// Clear out dirty storage
diff --git a/webbrowser/components/preferences/advanced.js b/webbrowser/components/preferences/advanced.js
index aab58b3..da5f8d1 100644
--- a/webbrowser/components/preferences/advanced.js
+++ b/webbrowser/components/preferences/advanced.js
@@ -51,6 +51,8 @@ var gAdvancedPane = {
this.updateActualCacheSize();
this.updateActualAppCacheSize();
+ this.updateHWADisplay();
+
// Notify observers that the UI is now ready
Services.obs.notifyObservers(window, "advanced-pane-loaded", null);
},
@@ -155,11 +157,7 @@ var gAdvancedPane = {
*/
updateHardwareAcceleration: function()
{
-#ifdef XP_WIN
- var fromPref = document.getElementById("layers.acceleration.disabled");
- var toPref = document.getElementById("gfx.direct2d.disabled");
- toPref.value = fromPref.value;
-#endif
+ this.updateHWADisplay();
},
// DATA CHOICES TAB
diff --git a/webbrowser/components/preferences/advanced.xul b/webbrowser/components/preferences/advanced.xul
index e5f3bb1..4466d63 100644
--- a/webbrowser/components/preferences/advanced.xul
+++ b/webbrowser/components/preferences/advanced.xul
@@ -1,9 +1,6 @@
<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
@@ -31,11 +28,9 @@
<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"
+ <preference id="layers.acceleration.enabled" name="layers.acceleration.enabled" type="bool"
onchange="gAdvancedPane.updateHardwareAcceleration()"/>
-#ifdef XP_WIN
- <preference id="gfx.direct2d.disabled" name="gfx.direct2d.disabled" type="bool" inverted="true"/>
-#endif
+ <preference id="layers.acceleration.force" name="layers.acceleration.force" type="bool"/>
<preference id="layout.spellcheckDefault" name="layout.spellcheckDefault" type="int"/>
#ifdef HAVE_SHELL_SERVICE
@@ -152,10 +147,6 @@
label="&useAutoScroll.label;"
accesskey="&useAutoScroll.accesskey;"
preference="general.autoScroll"/>
- <checkbox id="allowHWAccel"
- label="&allowHWAccel.label;"
- accesskey="&allowHWAccel.accesskey;"
- preference="layers.acceleration.disabled"/>
<checkbox id="checkSpelling"
label="&checkSpelling.label;"
accesskey="&checkSpelling.accesskey;"
@@ -164,6 +155,19 @@
preference="layout.spellcheckDefault"/>
</groupbox>
+ <!-- Hardware Acceleration -->
+ <groupbox id="browsingGroup" align="start">
+ <caption label="&HWAccel.label;"/>
+ <label>&restartRequired.label;</label>
+ <checkbox id="allowHWAccel"
+ label="&allowHWAccel.label;"
+ accesskey="&allowHWAccel.accesskey;"
+ reference="layers.acceleration.enabled"/>
+ <checkbox id="forceHWAccel" class="indent"
+ label="&forceHWAccel.label;"
+ preference="layers.acceleration.force"/>
+ </groupbox>
+
#ifdef HAVE_SHELL_SERVICE
<!-- System Defaults -->
<groupbox id="systemDefaultsGroup" orient="vertical">