summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-03-25 11:17:56 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-03-25 11:17:56 +0100
commita9800c5071ab094f4fe33b687f9a2ee72c54ec5b (patch)
tree986833fc8dbf319cfa1a9072817d0784c3aa4e21
parentb0429df61784814268af2286241acd3a9cceb242 (diff)
downloadbasilisk-a9800c5071ab094f4fe33b687f9a2ee72c54ec5b.tar.gz
Issue MoonchildProductions/UXP#1360 - Align basilisk FE with this change
-rw-r--r--basilisk/components/nsBrowserGlue.js15
-rw-r--r--basilisk/components/preferences/in-content/advanced.js4
-rw-r--r--basilisk/components/preferences/in-content/advanced.xul9
3 files changed, 20 insertions, 8 deletions
diff --git a/basilisk/components/nsBrowserGlue.js b/basilisk/components/nsBrowserGlue.js
index 2dac93e..5cfcbba 100644
--- a/basilisk/components/nsBrowserGlue.js
+++ b/basilisk/components/nsBrowserGlue.js
@@ -1651,7 +1651,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function() {
- const UI_VERSION = 42;
+ const UI_VERSION = 43;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
@@ -1972,6 +1972,19 @@ BrowserGlue.prototype = {
OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
}
+ if (currentUIVersion < 43) {
+ 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");
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
diff --git a/basilisk/components/preferences/in-content/advanced.js b/basilisk/components/preferences/in-content/advanced.js
index 850f0e0..202d744 100644
--- a/basilisk/components/preferences/in-content/advanced.js
+++ b/basilisk/components/preferences/in-content/advanced.js
@@ -217,9 +217,9 @@ var gAdvancedPane = {
updateHardwareAcceleration: function()
{
if (AppConstants.platform = "win") {
- var fromPref = document.getElementById("layers.acceleration.disabled");
+ var fromPref = document.getElementById("layers.acceleration.enabled");
var toPref = document.getElementById("gfx.direct2d.disabled");
- toPref.value = fromPref.value;
+ toPref.value = !fromPref.value;
}
},
diff --git a/basilisk/components/preferences/in-content/advanced.xul b/basilisk/components/preferences/in-content/advanced.xul
index 50e2765..d5498e7 100644
--- a/basilisk/components/preferences/in-content/advanced.xul
+++ b/basilisk/components/preferences/in-content/advanced.xul
@@ -34,10 +34,9 @@
<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"/>
#ifdef XP_WIN
<preference id="gfx.direct2d.disabled"
name="gfx.direct2d.disabled"
@@ -177,7 +176,7 @@
<checkbox id="allowHWAccel"
label="&allowHWAccel.label;"
accesskey="&allowHWAccel.accesskey;"
- preference="layers.acceleration.disabled"/>
+ preference="layers.acceleration.enabled"/>
<checkbox id="checkSpelling"
label="&checkSpelling.label;"
accesskey="&checkSpelling.accesskey;"