|
@@ -1,8 +1,8 @@
|
|
# HG changeset patch
|
|
# HG changeset patch
|
|
# User Dmitry Butskoy <dmitry@butskoy.name>
|
|
# User Dmitry Butskoy <dmitry@butskoy.name>
|
|
# Date 1595850090 -7200
|
|
# Date 1595850090 -7200
|
|
-# Parent b0350c4c0fc03da9847ce2c63173a44f71cb9fc8
|
|
|
|
-Bug 1655362 - Default Zoom support for SeaMonkey. r=IanN a=IanN
|
|
|
|
|
|
+# Parent c5f3cf19bebca6dbc502892a868e7008ad936db5
|
|
|
|
+Bug 1655362 - Default Zoom support for SeaMonkey. r=frg a=frg
|
|
|
|
|
|
diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js
|
|
diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js
|
|
--- a/suite/browser/navigator.js
|
|
--- a/suite/browser/navigator.js
|
|
@@ -49,7 +49,7 @@ diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js
|
|
diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pref/content/pref-content.js
|
|
diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pref/content/pref-content.js
|
|
--- a/suite/components/pref/content/pref-content.js
|
|
--- a/suite/components/pref/content/pref-content.js
|
|
+++ b/suite/components/pref/content/pref-content.js
|
|
+++ b/suite/components/pref/content/pref-content.js
|
|
-@@ -26,16 +26,46 @@ function Startup()
|
|
|
|
|
|
+@@ -26,16 +26,40 @@ function Startup()
|
|
|
|
|
|
minMinValue = firstValue;
|
|
minMinValue = firstValue;
|
|
minElement.min = minMinValue;
|
|
minElement.min = minMinValue;
|
|
@@ -69,25 +69,19 @@ diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pr
|
|
+ let cps2 = Cc["@mozilla.org/content-pref/service;1"]
|
|
+ let cps2 = Cc["@mozilla.org/content-pref/service;1"]
|
|
+ .getService(Ci.nsIContentPrefService2);
|
|
+ .getService(Ci.nsIContentPrefService2);
|
|
+
|
|
+
|
|
-+ let value = undefined;
|
|
|
|
-+
|
|
|
|
+ var zoomValue = cps2.getCachedGlobal("browser.content.full-zoom", null);
|
|
+ var zoomValue = cps2.getCachedGlobal("browser.content.full-zoom", null);
|
|
-+ if (zoomValue && zoomValue.value)
|
|
|
|
-+ value = zoomValue.value;
|
|
|
|
-+ else {
|
|
|
|
-+ cps2.getGlobal("browser.content.full-zoom", null, {
|
|
|
|
-+ handleResult(pref) {
|
|
|
|
-+ value = pref.value;
|
|
|
|
-+ },
|
|
|
|
-+ handleCompletion(reason) {}
|
|
|
|
-+ });
|
|
|
|
-+ }
|
|
|
|
-+
|
|
|
|
-+ if (value === undefined) {
|
|
|
|
-+ value = 1.0
|
|
|
|
|
|
++ if (zoomValue && zoomValue.value) {
|
|
|
|
++ defaultElement.value = Math.round(zoomValue.value * 100);
|
|
|
|
++ return;
|
|
+ }
|
|
+ }
|
|
+
|
|
+
|
|
-+ defaultElement.value = Math.round(value * 100);
|
|
|
|
|
|
++ defaultElement.value = 100;
|
|
|
|
++ cps2.getGlobal("browser.content.full-zoom", null, {
|
|
|
|
++ handleResult(pref) {
|
|
|
|
++ defaultElement.value = Math.round(pref.value * 100);
|
|
|
|
++ },
|
|
|
|
++ handleCompletion(reason) {}
|
|
|
|
++ });
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -96,7 +90,7 @@ diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pr
|
|
function DisableMinCheck(element)
|
|
function DisableMinCheck(element)
|
|
{
|
|
{
|
|
element.min = 0;
|
|
element.min = 0;
|
|
-@@ -49,16 +79,23 @@ function AdjustMaxZoom()
|
|
|
|
|
|
+@@ -49,16 +73,23 @@ function AdjustMaxZoom()
|
|
let minElement = document.getElementById("minZoom");
|
|
let minElement = document.getElementById("minZoom");
|
|
let maxElement = document.getElementById("maxZoom");
|
|
let maxElement = document.getElementById("maxZoom");
|
|
let maxPref = document.getElementById("zoom.maxPercent");
|
|
let maxPref = document.getElementById("zoom.maxPercent");
|
|
@@ -120,7 +114,7 @@ diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pr
|
|
*/
|
|
*/
|
|
function AdjustMinZoom()
|
|
function AdjustMinZoom()
|
|
{
|
|
{
|
|
-@@ -67,16 +104,41 @@ function AdjustMinZoom()
|
|
|
|
|
|
+@@ -67,16 +98,41 @@ function AdjustMinZoom()
|
|
let minPref = document.getElementById("zoom.minPercent");
|
|
let minPref = document.getElementById("zoom.minPercent");
|
|
let maxValue = maxElement.valueNumber < maxMinValue ?
|
|
let maxValue = maxElement.valueNumber < maxMinValue ?
|
|
maxMinValue : maxElement.valueNumber;
|
|
maxMinValue : maxElement.valueNumber;
|
|
@@ -149,11 +143,11 @@ diff --git a/suite/components/pref/content/pref-content.js b/suite/components/pr
|
|
+
|
|
+
|
|
+ if (defaultElement.valueNumber == 100) {
|
|
+ if (defaultElement.valueNumber == 100) {
|
|
+ cps2.removeGlobal("browser.content.full-zoom", null);
|
|
+ cps2.removeGlobal("browser.content.full-zoom", null);
|
|
-+ } else {
|
|
|
|
-+ let new_value = defaultElement.valueNumber / 100.;
|
|
|
|
-+
|
|
|
|
-+ cps2.setGlobal("browser.content.full-zoom", new_value, null);
|
|
|
|
|
|
++ return;
|
|
+ }
|
|
+ }
|
|
|
|
++
|
|
|
|
++ let new_value = defaultElement.valueNumber / 100.;
|
|
|
|
++ cps2.setGlobal("browser.content.full-zoom", new_value, null);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|