Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2023-10-18 11:52:06 +08:00
commit dd9eca1b39
6 changed files with 30 additions and 27 deletions

View file

@ -984,6 +984,7 @@ pref("services.sync.prefs.sync.privacy.clearOnShutdown.offlineApps", true);
pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true);
pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true); pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
pref("services.sync.prefs.sync.privacy.GPCheader.enabled", true);
pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true); pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true);
pref("services.sync.prefs.sync.security.OCSP.enabled", true); pref("services.sync.prefs.sync.security.OCSP.enabled", true);
pref("services.sync.prefs.sync.security.OCSP.require", true); pref("services.sync.prefs.sync.security.OCSP.require", true);

View file

@ -1524,7 +1524,7 @@ BrowserGlue.prototype = {
}, },
_migrateUI: function() { _migrateUI: function() {
const UI_VERSION = 43; const UI_VERSION = 44;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul"; const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion; let currentUIVersion;
@ -1858,6 +1858,15 @@ BrowserGlue.prototype = {
Services.prefs.clearUserPref("layers.acceleration.force-enabled"); Services.prefs.clearUserPref("layers.acceleration.force-enabled");
} }
if (currentUIVersion < 44) {
// DoNotTrack is now GPC. Carry across user preference.
if (Services.prefs.prefHasUserValue("privacy.donottrackheader.enabled")) {
let DNTEnabled = Services.prefs.getBoolPref("privacy.donottrackheader.enabled");
Services.prefs.setBoolPref("privacy.GPCheader.enabled", DNTEnabled);
Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
}
}
// Update the migration version. // Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION); Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
}, },

View file

@ -9,9 +9,9 @@
<preferences id="privacyPreferences" hidden="true" data-category="panePrivacy"> <preferences id="privacyPreferences" hidden="true" data-category="panePrivacy">
<!-- Tracking --> <!-- Global Privacy Control -->
<preference id="privacy.donottrackheader.enabled" <preference id="privacy.GPCheader.enabled"
name="privacy.donottrackheader.enabled" name="privacy.GPCheader.enabled"
type="bool"/> type="bool"/>
<!-- XXX button prefs --> <!-- XXX button prefs -->
@ -80,18 +80,18 @@
<html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a> <html:a class="help-button" target="_blank" aria-label="&helpButton.label;"></html:a>
</hbox> </hbox>
<!-- Tracking --> <!-- Global Privacy Control -->
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true"> <groupbox id="dataPrivacyGroup" data-category="panePrivacy" hidden="true">
<vbox id="donottrackbox"> <vbox id="privacygpcbox">
<caption><label>&tracking.label;</label></caption> <caption><label>&dataPrivacy.label;</label></caption>
<hbox align="center"> <hbox align="center">
<checkbox id="DoNotTrack" <checkbox id="GPC"
preference="privacy.donottrackheader.enabled" preference="privacy.GPCheader.enabled"
accesskey="&doNotTrack.accesskey;" accesskey="&GPC.accesskey;"
label="&doNotTrack.label;" /> label="&GPCLabel.label;" />
<label class="text-link" <label class="text-link"
value="&doNotTrackLearnMore.label;" value="&GPCLearnMore.label;"
href="https://www.mozilla.org/dnt"/> href="https://www.palemoon.org/support/global-privacy-control"/>
</hbox> </hbox>
</vbox> </vbox>
</groupbox> </groupbox>

View file

@ -2,10 +2,10 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY tracking.label "Tracking"> <!ENTITY dataPrivacy.label "Data Privacy">
<!ENTITY doNotTrack.label "Send a signal that you don’t want to be tracked"> <!ENTITY GPCLabel.label "Tell sites not to share or sell my data">
<!ENTITY doNotTrack.accesskey "T"> <!ENTITY GPC.accesskey "n">
<!ENTITY doNotTrackLearnMore.label "Learn More"> <!ENTITY GPCLearnMore.label "Learn More">
<!ENTITY history.label "History"> <!ENTITY history.label "History">

View file

@ -242,13 +242,13 @@ treecol {
font-weight: normal; font-weight: normal;
} }
.doNotTrackLearnMore { .GPCLearnMore {
margin-inline-start: calc(1em + 30px); margin-inline-start: calc(1em + 30px);
margin-bottom: 1em; margin-bottom: 1em;
font-weight: normal; font-weight: normal;
} }
.doNotTrackLearnMore > label { .GPCLearnMore > label {
font-size: 1em !important; font-size: 1em !important;
margin-left: 0; margin-left: 0;
} }

View file

@ -22,7 +22,6 @@ this.Preferences = {
["paneContent", null], ["paneContent", null],
["paneApplications", null], ["paneApplications", null],
["panePrivacy", null], ["panePrivacy", null],
["panePrivacy", null, DNTDialog],
["panePrivacy", null, clearRecentHistoryDialog], ["panePrivacy", null, clearRecentHistoryDialog],
["paneSecurity", null], ["paneSecurity", null],
["paneSync", null], ["paneSync", null],
@ -96,12 +95,6 @@ function paintPromise(browserWindow) {
}); });
} }
function* DNTDialog(aBrowser) {
yield ContentTask.spawn(aBrowser, null, function* () {
content.document.getElementById("doNotTrackSettings").click();
});
}
function* connectionDialog(aBrowser) { function* connectionDialog(aBrowser) {
yield ContentTask.spawn(aBrowser, null, function* () { yield ContentTask.spawn(aBrowser, null, function* () {
content.document.getElementById("connectionSettings").click(); content.document.getElementById("connectionSettings").click();