Bug 1501991 - Add a sub-panel for Trackers in the control center. r=Jamie,Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D11611

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Johann Hofmann 2018-11-16 10:50:31 +00:00
Родитель f9c104f82b
Коммит 1b22275384
16 изменённых файлов: 435 добавлений и 49 удалений

Просмотреть файл

@ -8,6 +8,8 @@ var TrackingProtection = {
PREF_ENABLED_GLOBALLY: "privacy.trackingprotection.enabled",
PREF_ENABLED_IN_PRIVATE_WINDOWS: "privacy.trackingprotection.pbmode.enabled",
PREF_UI_ENABLED: "browser.contentblocking.trackingprotection.control-center.ui.enabled",
PREF_TRACKING_TABLE: "urlclassifier.trackingTable",
PREF_TRACKING_ANNOTATION_TABLE: "urlclassifier.trackingAnnotationTable",
enabledGlobally: false,
enabledInPrivateWindows: false,
@ -17,6 +19,16 @@ var TrackingProtection = {
document.getElementById("identity-popup-content-blocking-category-tracking-protection");
},
get subViewList() {
delete this.subViewList;
return this.subViewList = document.getElementById("identity-popup-trackersView-list");
},
get strictInfo() {
delete this.strictInfo;
return this.strictInfo = document.getElementById("identity-popup-trackersView-strict-info");
},
init() {
this.updateEnabled();
@ -24,6 +36,8 @@ var TrackingProtection = {
Services.prefs.addObserver(this.PREF_ENABLED_IN_PRIVATE_WINDOWS, this);
XPCOMUtils.defineLazyPreferenceGetter(this, "visible", this.PREF_UI_ENABLED, false);
XPCOMUtils.defineLazyPreferenceGetter(this, "trackingTable", this.PREF_TRACKING_TABLE, false);
XPCOMUtils.defineLazyPreferenceGetter(this, "trackingAnnotationTable", this.PREF_TRACKING_ANNOTATION_TABLE, false);
},
uninit() {
@ -51,6 +65,86 @@ var TrackingProtection = {
isBlockerActivated(state) {
return state & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT;
},
isAllowing(state) {
return state & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT;
},
async updateSubView() {
let previousURI = gBrowser.currentURI.spec;
let previousWindow = gBrowser.selectedBrowser.innerWindowID;
let contentBlockingLogJSON = await gBrowser.selectedBrowser.getContentBlockingLog();
let contentBlockingLog = JSON.parse(contentBlockingLogJSON);
// Don't tell the user to turn on TP if they are already blocking trackers.
this.strictInfo.hidden = this.enabled;
let fragment = document.createDocumentFragment();
for (let [origin, actions] of Object.entries(contentBlockingLog)) {
let listItem = await this._createListItem(origin, actions);
if (listItem) {
fragment.appendChild(listItem);
}
}
// This might have taken a while. Only update the list if we're still on the same page.
if (previousURI == gBrowser.currentURI.spec &&
previousWindow == gBrowser.selectedBrowser.innerWindowID) {
this.subViewList.textContent = "";
this.subViewList.append(fragment);
}
},
// Given a URI from a source that was tracking-annotated, figure out
// if it's really on the tracking table or just on the annotation table.
_isOnTrackingTable(uri) {
if (this.trackingTable == this.trackingAnnotationTable) {
return true;
}
return new Promise(resolve => {
classifierService.asyncClassifyLocalWithTables(uri, this.trackingTable, [], [],
(code, list) => resolve(!!list));
});
},
async _createListItem(origin, actions) {
// Figure out if this list entry was actually detected by TP or something else.
let isDetected = false;
let isAllowed = false;
for (let [state] of actions) {
isAllowed = isAllowed || this.isAllowing(state);
isDetected = isDetected || isAllowed || this.isBlockerActivated(state);
}
if (!isDetected) {
return null;
}
let uri = Services.io.newURI(origin);
// Because we might use different lists for annotation vs. blocking, we
// need to make sure that this is a tracker that we would actually have blocked
// before showing it to the user.
let isTracker = await this._isOnTrackingTable(uri);
if (!isTracker) {
return null;
}
let listItem = document.createXULElement("hbox");
listItem.className = "identity-popup-trackersView-list-item";
listItem.classList.toggle("allowed", isAllowed);
let image = document.createXULElement("image");
listItem.append(image);
let label = document.createXULElement("label");
label.value = uri.host;
label.setAttribute("crop", "end");
listItem.append(label);
return listItem;
},
};
var ThirdPartyCookies = {
@ -147,6 +241,11 @@ var ContentBlocking = {
return this.appMenuLabel = document.getElementById("appMenu-tp-label");
},
get identityPopup() {
delete this.identityPopup;
return this.identityPopup = document.getElementById("identity-popup");
},
strings: {
get appMenuTitle() {
delete this.appMenuTitle;
@ -238,7 +337,7 @@ var ContentBlocking = {
},
hideIdentityPopupAndReload() {
document.getElementById("identity-popup").hidePopup();
this.identityPopup.hidePopup();
BrowserReload();
},
@ -251,7 +350,7 @@ var ContentBlocking = {
},
submitBreakageReport() {
document.getElementById("identity-popup").hidePopup();
this.identityPopup.hidePopup();
let reportEndpoint = Services.prefs.getStringPref(this.PREF_REPORT_BREAKAGE_URL);
if (!reportEndpoint) {
@ -314,6 +413,11 @@ var ContentBlocking = {
this.identityPopupMultiView.showSubView("identity-popup-breakageReportView");
},
async showTrackersSubview() {
await TrackingProtection.updateSubView();
this.identityPopupMultiView.showSubView("identity-popup-trackersView");
},
shieldHistogramAdd(value) {
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
return;

Просмотреть файл

@ -143,6 +143,7 @@ if (AppConstants.NIGHTLY_BUILD) {
// lazy service getters
XPCOMUtils.defineLazyServiceGetters(this, {
classifierService: ["@mozilla.org/url-classifier/dbservice;1", "nsIURIClassifier"],
Favicons: ["@mozilla.org/browser/favicon-service;1", "nsIFaviconService"],
gAboutNewTabService: ["@mozilla.org/browser/aboutnewtab-service;1", "nsIAboutNewTabService"],
gDNSService: ["@mozilla.org/network/dns-service;1", "nsIDNSService"],

Просмотреть файл

@ -23,3 +23,4 @@ support-files =
[browser_trackingUI_state.js]
[browser_trackingUI_state_all_disabled.js]
[browser_trackingUI_telemetry.js]
[browser_trackingUI_trackers_subview.js]

Просмотреть файл

@ -59,9 +59,9 @@ function testTrackingPage(window) {
ok(!hidden("#identity-popup-content-blocking-detected"), "blocking detected label is visible");
ok(!hidden("#identity-popup-content-blocking-category-list"), "category list is visible");
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > .identity-popup-content-blocking-category-add-blocking"),
"TP category item is not showing add blocking");
ok(!hidden("#identity-popup-content-blocking-category-tracking-protection > .identity-popup-content-blocking-category-state-label"),
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > #identity-popup-content-blocking-tracking-protection-label-allowed"),
"TP category item is not showing the allowed label");
ok(!hidden("#identity-popup-content-blocking-category-tracking-protection > #identity-popup-content-blocking-tracking-protection-label-blocked"),
"TP category item is set to blocked");
}
@ -84,9 +84,9 @@ function testTrackingPageUnblocked() {
ok(!hidden("#identity-popup-content-blocking-detected"), "blocking detected label is visible");
ok(!hidden("#identity-popup-content-blocking-category-list"), "category list is visible");
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > .identity-popup-content-blocking-category-add-blocking"),
"TP category item is not showing add blocking");
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > .identity-popup-content-blocking-category-state-label"),
ok(!hidden("#identity-popup-content-blocking-category-tracking-protection > #identity-popup-content-blocking-tracking-protection-label-allowed"),
"TP category item is showing the allowed label");
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > #identity-popup-content-blocking-tracking-protection-label-blocked"),
"TP category item is not set to blocked");
}

Просмотреть файл

@ -134,20 +134,26 @@ function testTrackingPage(window) {
ok(!hidden("#identity-popup-content-blocking-detected"), "blocking detected label is visible");
ok(!hidden("#identity-popup-content-blocking-category-list"), "category list is visible");
let category = Services.prefs.getIntPref(TPC_PREF) == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER ?
"#identity-popup-content-blocking-category-3rdpartycookies" :
"#identity-popup-content-blocking-category-tracking-protection";
is(hidden(category + " > .identity-popup-content-blocking-category-add-blocking"), blockedByTP,
"Category item is" + (blockedByTP ? " not" : "") + " showing add blocking");
is(hidden(category + " > .identity-popup-content-blocking-category-state-label"), !blockedByTP,
"Category item is" + (blockedByTP ? "" : " not") + " set to blocked");
if (Services.prefs.getIntPref(TPC_PREF) == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER) {
let cookiesBlocked = Services.prefs.getIntPref(TPC_PREF) == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
if (cookiesBlocked) {
let category = "#identity-popup-content-blocking-category-3rdpartycookies";
is(hidden(category + " > .identity-popup-content-blocking-category-add-blocking"), blockedByTP,
"Category item is" + (blockedByTP ? " not" : "") + " showing add blocking");
is(hidden(category + " > .identity-popup-content-blocking-category-state-label"), !blockedByTP,
"Category item is" + (blockedByTP ? "" : " not") + " set to blocked");
ok(hidden("#identity-popup-content-blocking-category-label-default"),
"Not showing default cookie restrictions label.");
ok(!hidden("#identity-popup-content-blocking-category-label-trackers"),
"Showing trackers cookie restrictions label.");
} else {
let category = "#identity-popup-content-blocking-category-tracking-protection";
is(hidden(category + " > #identity-popup-content-blocking-tracking-protection-label-allowed"), blockedByTP,
"Category item is" + (blockedByTP ? " not" : "") + " showing the allowed label");
is(!hidden(category + " > #identity-popup-content-blocking-tracking-protection-label-blocked"), blockedByTP,
"Category item is" + (blockedByTP ? "" : " not") + " set to blocked");
ok(hidden("#identity-popup-content-blocking-category-label-trackers"),
"Not showing trackers cookie restrictions label.");
ok(!hidden("#identity-popup-content-blocking-category-label-default"),
@ -175,14 +181,22 @@ function testTrackingPageUnblocked(blockedByTP, window) {
ok(!hidden("#identity-popup-content-blocking-detected"), "blocking detected label is visible");
ok(!hidden("#identity-popup-content-blocking-category-list"), "category list is visible");
let category = Services.prefs.getIntPref(TPC_PREF) == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER ?
"#identity-popup-content-blocking-category-3rdpartycookies" :
"#identity-popup-content-blocking-category-tracking-protection";
is(hidden(category + " > .identity-popup-content-blocking-category-add-blocking"), blockedByTP,
"Category item is" + (blockedByTP ? " not" : "") + " showing add blocking");
// Always hidden no matter if blockedByTP or not, since we have an exception.
ok(hidden("#identity-popup-content-blocking-category-tracking-protection > .identity-popup-content-blocking-category-state-label"),
"TP category item is not set to blocked");
let cookiesBlocked = Services.prefs.getIntPref(TPC_PREF) == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
if (cookiesBlocked) {
let category = "#identity-popup-content-blocking-category-3rdpartycookies";
is(hidden(category + " > .identity-popup-content-blocking-category-add-blocking"), blockedByTP,
"Category item is" + (blockedByTP ? " not" : "") + " showing add blocking");
ok(!hidden("#identity-popup-content-blocking-category-tracking-protection > #identity-popup-content-blocking-tracking-protection-label-allowed"),
"TP category item is showing the allowed label");
} else {
let category = "#identity-popup-content-blocking-category-tracking-protection";
// If there's an exception we always show the "Allowed" label.
ok(!hidden(category + " > #identity-popup-content-blocking-tracking-protection-label-allowed"),
"Category item is showing the allowed label");
ok(hidden(category + " > #identity-popup-content-blocking-tracking-protection-label-blocked"),
"Category item is not set to blocked");
}
}
async function testContentBlocking(tab) {

Просмотреть файл

@ -0,0 +1,118 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/trackingUI/trackingPage.html";
const TP_PREF = "privacy.trackingprotection.enabled";
add_task(async function setup() {
await UrlClassifierTestUtils.addTestTrackers();
});
function openIdentityPopup() {
let mainView = document.getElementById("identity-popup-mainView");
let viewShown = BrowserTestUtils.waitForEvent(mainView, "ViewShown");
gIdentityHandler._identityBox.click();
return viewShown;
}
function waitForSecurityChange(blocked) {
return new Promise(resolve => {
let webProgressListener = {
onStateChange: () => {},
onStatusChange: () => {},
onLocationChange: () => {},
onSecurityChange: (webProgress, request, oldState, state) => {
if ((!blocked && state & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT) ||
(blocked && state & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT)) {
gBrowser.removeProgressListener(webProgressListener);
resolve();
}
},
onProgressChange: () => {},
QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener]),
};
gBrowser.addProgressListener(webProgressListener);
});
}
async function assertSitesListed(blocked) {
await BrowserTestUtils.withNewTab(TRACKING_PAGE, async function(browser) {
await openIdentityPopup();
let categoryItem =
document.getElementById("identity-popup-content-blocking-category-tracking-protection");
ok(BrowserTestUtils.is_visible(categoryItem), "TP category item is visible");
let trackersView = document.getElementById("identity-popup-trackersView");
let viewShown = BrowserTestUtils.waitForEvent(trackersView, "ViewShown");
categoryItem.click();
await viewShown;
ok(true, "Trackers view was shown");
let listItems = document.querySelectorAll(".identity-popup-trackersView-list-item");
is(listItems.length, 1, "We have 1 tracker in the list");
let strictInfo = document.getElementById("identity-popup-trackersView-strict-info");
is(BrowserTestUtils.is_hidden(strictInfo), Services.prefs.getBoolPref(TP_PREF),
"Strict info is hidden if TP is enabled.");
let mainView = document.getElementById("identity-popup-mainView");
viewShown = BrowserTestUtils.waitForEvent(mainView, "ViewShown");
let backButton = trackersView.querySelector(".subviewbutton-back");
backButton.click();
await viewShown;
ok(true, "Main view was shown");
let change = waitForSecurityChange(blocked);
await ContentTask.spawn(browser, {}, function() {
content.postMessage("more-tracking", "*");
});
await change;
viewShown = BrowserTestUtils.waitForEvent(trackersView, "ViewShown");
categoryItem.click();
await viewShown;
ok(true, "Trackers view was shown");
listItems = Array.from(document.querySelectorAll(".identity-popup-trackersView-list-item"));
is(listItems.length, 2, "We have 2 trackers in the list");
let listItem = listItems.find(item => item.querySelector("label").value == "trackertest.org");
ok(listItem, "Has an item for trackertest.org");
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
is(listItem.classList.contains("allowed"), !blocked,
"Indicates whether the tracker was blocked or allowed");
listItem = listItems.find(item => item.querySelector("label").value == "itisatracker.org");
ok(listItem, "Has an item for itisatracker.org");
ok(BrowserTestUtils.is_visible(listItem), "List item is visible");
is(listItem.classList.contains("allowed"), !blocked,
"Indicates whether the tracker was blocked or allowed");
});
}
add_task(async function testTrackersSubView() {
Services.prefs.setBoolPref(TP_PREF, false);
await assertSitesListed(false);
Services.prefs.setBoolPref(TP_PREF, true);
await assertSitesListed(true);
let uri = Services.io.newURI("https://tracking.example.org");
Services.perms.add(uri, "trackingprotection", Services.perms.ALLOW_ACTION);
await assertSitesListed(false);
Services.perms.remove(uri, "trackingprotection");
await assertSitesListed(true);
Services.prefs.clearUserPref(TP_PREF);
});
add_task(function cleanup() {
Services.prefs.clearUserPref(TP_PREF);
UrlClassifierTestUtils.cleanupTestTrackers();
});

Просмотреть файл

@ -6,6 +6,12 @@ onmessage = event => {
document.body.appendChild(ifr);
}
break;
case "more-tracking": {
let ifr = document.createElement("iframe");
ifr.src = "https://itisatracker.org/";
document.body.appendChild(ifr);
}
break;
case "cookie": {
let ifr = document.createElement("iframe");
ifr.src = "https://trackertest.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs";

Просмотреть файл

@ -82,15 +82,16 @@
crop="end">&contentBlocking.notDetected;</description>
<vbox id="identity-popup-content-blocking-category-list">
<hbox id="identity-popup-content-blocking-category-tracking-protection"
class="identity-popup-content-blocking-category" align="center" role="group">
<toolbarbutton id="identity-popup-content-blocking-category-tracking-protection"
onclick="ContentBlocking.showTrackersSubview()"
class="identity-popup-content-blocking-category" align="center">
<image class="identity-popup-content-blocking-category-icon tracking-protection-icon"/>
<label flex="1" class="identity-popup-content-blocking-category-label">&contentBlocking.trackingProtection3.label;</label>
<label flex="1" class="identity-popup-content-blocking-category-state-label">&contentBlocking.trackingProtection.blocking.label;</label>
<label flex="1" class="identity-popup-content-blocking-category-add-blocking text-link"
id="identity-popup-tracking-protection-add-blocking"
onclick="ContentBlocking.openPreferences('identityPopup-CB-tracking-protection'); gIdentityHandler.recordClick('tp_add_blocking');">&contentBlocking.trackingProtection.add.label;</label>
</hbox>
<label flex="1" id="identity-popup-content-blocking-tracking-protection-label-allowed"
class="identity-popup-content-blocking-category-state-label">&contentBlocking.trackingProtection.allowed.label;</label>
<label flex="1" id="identity-popup-content-blocking-tracking-protection-label-blocked"
class="identity-popup-content-blocking-category-state-label">&contentBlocking.trackingProtection.blocked.label;</label>
</toolbarbutton>
<hbox id="identity-popup-content-blocking-category-3rdpartycookies"
class="identity-popup-content-blocking-category" align="center" role="group">
<image class="identity-popup-content-blocking-category-icon thirdpartycookies-icon"/>
@ -249,6 +250,25 @@
</panelview>
<!-- Trackers SubView -->
<panelview id="identity-popup-trackersView"
role="document"
title="&contentBlocking.trackersView.label;"
descriptionheightworkaround="true">
<vbox id="identity-popup-trackersView-list">
</vbox>
<hbox id="identity-popup-trackersView-strict-info">
<image/>
<label>&contentBlocking.trackersView.strictInfo.label;</label>
</hbox>
<vbox class="identity-popup-footer">
<button id="identity-popup-trackersView-settings-button"
label="&contentBlocking.manageSettings.label;"
accesskey="&contentBlocking.manageSettings.accesskey;"
oncommand="ContentBlocking.openPreferences();"/>
</vbox>
</panelview>
<!-- Report Breakage SubView -->
<panelview id="identity-popup-breakageReportView"
title="&contentBlocking.breakageReportView.label;"

Просмотреть файл

@ -970,24 +970,19 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY contentBlocking.disabled.tooltip "You have disabled Content Blocking.">
<!ENTITY contentBlocking.exception.tooltip "You have disabled Content Blocking for this site.">
<!ENTITY contentBlocking.trackingProtection2.label "All Detected Trackers">
<!ENTITY contentBlocking.trackingProtection3.label "Trackers">
<!-- LOCALIZATION NOTE (contentBlocking.trackingProtection.allowed.label):
This label signals that this type of content blocking is turned
OFF and is not blocking tracker content, so this is not
a positive thing. It forms the end of the (imaginary) sentence
"Trackers [are] Allowed"-->
<!ENTITY contentBlocking.trackingProtection.allowed.label "Allowed">
<!-- LOCALIZATION NOTE (contentBlocking.trackingProtection.blocked.label):
This label signals that this type of content blocking is turned
ON and is successfully blocking tracker content, so this is
a positive thing. It forms the end of the (imaginary) sentence
"Trackers [are] Blocked"-->
<!ENTITY contentBlocking.trackingProtection.blocked.label "Blocked">
<!-- LOCALIZATION NOTE (contentBlocking.tranckingProtection.blocking.label):
This label signals that this type of content blocking is turned
ON, so this is a positive thing. It forms the verb in the (imaginary) sentence
"Firefox is blocking Trackers"-->
<!ENTITY contentBlocking.trackingProtection.blocking.label "Blocking">
<!-- LOCALIZATION NOTE (contentBlocking.trackingProtection.add.label):
This is displayed as a link to preferences, where the user can add
this specific type of content blocking. When this text is shown
the type of content blocking is currently not enabled. -->
<!ENTITY contentBlocking.trackingProtection.add.label "Add Blocking…">
<!ENTITY contentBlocking.3rdPartyCookies.label "Third-Party Cookies">
<!ENTITY contentBlocking.3rdPartyCookies.trackers.label "Tracking Cookies">
@ -1008,6 +1003,12 @@ you can use these alternative items. Otherwise, their values should be empty. -
the type of content blocking is currently not enabled. -->
<!ENTITY contentBlocking.3rdPartyCookies.add.label "Add Blocking…">
<!ENTITY contentBlocking.manageSettings.label "Manage Content Blocking">
<!ENTITY contentBlocking.manageSettings.accesskey "M">
<!ENTITY contentBlocking.trackersView.label "Trackers">
<!ENTITY contentBlocking.trackersView.strictInfo.label "To block all trackers, set content blocking to “Strict”.">
<!ENTITY contentBlocking.openBreakageReportView2.label "Report a problem">
<!ENTITY contentBlocking.breakageReportView.label "Report Problems">
<!ENTITY contentBlocking.breakageReportView2.description "Content blocking can cause problems with some websites. When you report problems, youll help make &brandShortName; better for everyone. (This will send a URL as well as information about your browser settings to Mozilla.)">

Просмотреть файл

@ -0,0 +1,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/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="context-fill" fill-rule="evenodd" d="M8 1a7 7 0 1 1-7 7 7 7 0 0 1 7-7zm0 3a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm0 3a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V8a1 1 0 0 1 1-1z"></path></svg>

После

Ширина:  |  Высота:  |  Размер: 477 B

Просмотреть файл

@ -9,6 +9,10 @@
display: none;
}
#identity-popup {
--identity-popup-width: 33rem;
}
/* This is used by screenshots tests to hide intermittently different
* identity popup shadows (see bug 1425253). */
#identity-popup.no-shadow {
@ -68,8 +72,8 @@
}
#identity-popup-mainView {
min-width: 33em;
max-width: 33em;
min-width: var(--identity-popup-width);
max-width: var(--identity-popup-width);
}
.identity-popup-section {
@ -145,7 +149,12 @@
/* CONTENT */
.identity-popup-footer,
.tracking-protection-button,
#identity-popup-trackersView-strict-info > label,
.identity-popup-trackersView-list-item > label,
#identity-popup-mainView-panel-header > label,
#identity-popup-trackersView > .panel-header,
#identity-popup-securityView > .panel-header,
#identity-popup-breakageReportView > .panel-header,
#identity-popup-content-blocking-report-breakage,
@ -178,7 +187,7 @@
overflow-wrap: break-word;
/* This is needed for the overflow-wrap to work correctly.
* 33em is the panel width, panel-header has 1em padding on each side. */
max-width: calc(33rem - 2em);
max-width: calc(var(--identity-popup-width) - 2em);
}
#identity-popup-permissions-content > description,
@ -201,7 +210,7 @@
/* This is needed for the overflow-wrap to work correctly.
* 1em + 2em + 24px is .identity-popup-security-content padding
* 33em is the panel width */
max-width: calc(33rem - 3rem - 24px);
max-width: calc(var(--identity-popup-width) - 3rem - 24px);
}
.identity-popup-warning-gray {
@ -382,6 +391,93 @@ description#identity-popup-content-verifier,
background-image: url("chrome://browser/skin/controlcenter/tracking-protection.svg");
}
#identity-popup-content-blocking-category-tracking-protection {
/* Overwrite toolbarbutton styles */
margin: 0;
padding-inline-start: 0;
}
#identity-popup-content-blocking-category-tracking-protection:-moz-focusring,
#identity-popup-content-blocking-category-tracking-protection:hover {
border-radius: 2px;
background-color: var(--arrowpanel-dimmed-further);
}
#identity-popup-content-blocking-category-tracking-protection:hover:active {
background-color: var(--arrowpanel-dimmed-even-further);
}
#identity-popup-content-blocking-category-tracking-protection::after {
content: url(chrome://browser/skin/back-12.svg);
-moz-context-properties: fill, fill-opacity;
transform: scaleX(-1) translateY(1px);
float: right;
}
#identity-popup-content-blocking-category-tracking-protection:-moz-locale-dir(rtl)::after {
transform: scaleX(1) translateY(1px);
}
/* This subview could get filled with a lot of trackers, set a maximum size
* and allow it to scroll vertically.*/
#identity-popup-trackersView {
max-height: 600px;
}
#identity-popup-trackersView-list {
padding: 5px 20px;
-moz-box-flex: 1;
overflow: scroll;
}
.identity-popup-trackersView-list-item {
margin: 5px 0;
overflow: hidden;
}
.identity-popup-trackersView-list-item > label {
/* Limit to full width - container padding - icon width - icon margin */
max-width: calc(var(--identity-popup-width) - 40px - 16px - 10px);
}
.identity-popup-trackersView-list-item > image {
list-style-image: url(chrome://browser/skin/controlcenter/trackers-disabled.svg);
margin-inline-end: 10px;
-moz-context-properties: fill, fill-opacity;
}
.identity-popup-trackersView-list-item.allowed > image {
list-style-image: url(chrome://browser/skin/controlcenter/trackers.svg);
}
#identity-popup-trackersView-strict-info {
min-height: 40px;
/* Limit to full width - margin */
max-width: calc(var(--identity-popup-width) - 12px);
min-width: calc(var(--identity-popup-width) - 12px);
background-color: #45a1ff80;
margin: 6px;
text-align: center;
-moz-box-align: center;
-moz-box-pack: center;
padding: 5px 15px;
border-radius: 3px;
color: #002275;
}
#identity-popup-trackersView-strict-info > image {
list-style-image: url(chrome://browser/skin/controlcenter/info.svg);
-moz-context-properties: fill;
fill: currentColor;
margin-inline-end: 10px;
}
#identity-popup-trackersView-strict-info > label {
overflow-wrap: break-word;
/* Limit to full width - container margin - container padding - icon width - icon margin */
max-width: calc(var(--identity-popup-width) - 12px - 20px - 16px - 10px);
}
/* Disabled label */
#identity-popup-content-blocking-disabled-label {
@ -433,11 +529,20 @@ description#identity-popup-content-verifier,
display: none;
}
#identity-popup-content-blocking-content[hasException] .identity-popup-content-blocking-category-state-label,
.identity-popup-content-blocking-category:not(.blocked) .identity-popup-content-blocking-category-state-label {
.identity-popup-content-blocking-category-state-label {
display: none;
}
/* TODO: This will be cleaned up by bug 1501992 */
/* Hide the state label unless we blocked something only for third party cookies */
#identity-popup-content-blocking-content:not([hasException]) #identity-popup-content-blocking-category-3rdpartycookies.blocked .identity-popup-content-blocking-category-state-label,
/* For trackers, either show a "blocked" or "allowed" label depending on the state. */
#identity-popup-content-blocking-content:not([hasException]) #identity-popup-content-blocking-category-tracking-protection.blocked > #identity-popup-content-blocking-tracking-protection-label-blocked,
#identity-popup-content-blocking-category-tracking-protection:not(.blocked) > #identity-popup-content-blocking-tracking-protection-label-allowed,
#identity-popup-content-blocking-content[hasException] #identity-popup-content-blocking-tracking-protection-label-allowed {
display: -moz-box;
}
.identity-popup-content-blocking-category.blocked .identity-popup-content-blocking-category-add-blocking {
display: none;
}
@ -468,6 +573,7 @@ description#identity-popup-content-verifier,
height: 32px;
background-color: var(--arrowpanel-dimmed);
color: inherit;
margin-inline-end: 8px;
}
.tracking-protection-button:hover {
@ -551,7 +657,7 @@ description#identity-popup-content-verifier,
/* Offset the padding set on #identity-popup-permissions-content so that it
shows up just below the section. The permission icons are 16px wide and
should be right aligned with the section icon. */
margin-inline-start: calc(-1em - 16px);
margin-inline-start: calc(-1em - 24px);
}
.identity-popup-content-blocking-category,
@ -559,6 +665,14 @@ description#identity-popup-content-verifier,
min-height: 24px;
}
.identity-popup-content-blocking-category {
padding-inline-end: 12px;
}
.identity-popup-permission-item {
padding-inline-end: 8px;
}
#identity-popup-permission-list:not(:empty) {
margin-top: 5px;
}
@ -567,6 +681,7 @@ description#identity-popup-content-verifier,
.identity-popup-permission-icon {
width: 16px;
height: 16px;
margin-inline-start: 12px;
}
.identity-popup-permission-icon.in-use {

Просмотреть файл

@ -28,6 +28,7 @@
skin/classic/browser/controlcenter/connection.svg (../shared/controlcenter/connection.svg)
skin/classic/browser/controlcenter/mcb-disabled.svg (../shared/controlcenter/mcb-disabled.svg)
skin/classic/browser/controlcenter/extension.svg (../shared/controlcenter/extension.svg)
skin/classic/browser/controlcenter/info.svg (../shared/controlcenter/info.svg)
skin/classic/browser/controlcenter/permissions.svg (../shared/controlcenter/permissions.svg)
skin/classic/browser/controlcenter/trackers.svg (../shared/controlcenter/trackers.svg)
skin/classic/browser/controlcenter/trackers-disabled.svg (../shared/controlcenter/trackers-disabled.svg)

Двоичные данные
build/pgo/certs/cert9.db

Двоичный файл не отображается.

Двоичные данные
build/pgo/certs/key4.db

Двоичный файл не отображается.

Двоичные данные
build/pgo/certs/mochitest.client

Двоичный файл не отображается.

Просмотреть файл

@ -175,6 +175,7 @@ http://not-tracking.example.com:80
http://tracking.example.org:80
http://another-tracking.example.net:80
http://itisatracker.org:80
https://itisatracker.org:443
http://trackertest.org:80
https://malware.example.com:443