From 7c0ff43850bf5fdaeb8ef68a7b1d4bdf30b52da5 Mon Sep 17 00:00:00 2001 From: Georgios Kontaxis Date: Fri, 22 Aug 2014 20:26:31 -0700 Subject: [PATCH] Bug 1043801: tracking protection notifications show up in the generic security notification doorhanger, interactions with permissionManager to disable/enable tracking protection for a page r=adw --- browser/base/content/browser.js | 10 +- browser/base/content/urlbarBindings.xml | 109 ++++++++++++++++++ .../locales/en-US/chrome/browser/browser.dtd | 8 ++ 3 files changed, 125 insertions(+), 2 deletions(-) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 22fbd15278cd..ae6e274f37cc 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6488,9 +6488,13 @@ var gIdentityHandler = { // Show the doorhanger when: // - mixed active content is blocked // - mixed active content is loaded (detected but not blocked) + // - tracking content is blocked + // - tracking content is not blocked if (state & (nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT | - nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT)) { + nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT | + nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT | + nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT)) { this.showBadContentDoorhanger(state); } }, @@ -6513,7 +6517,9 @@ var gIdentityHandler = { // default let iconState = "bad-content-blocked-notification-icon"; - if (state & Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) { + if (state & + (Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT | + Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT)) { iconState = "bad-content-unblocked-notification-icon"; } diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index baf5baee1607..45c465242661 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -1628,6 +1628,43 @@ + + @@ -1668,6 +1705,32 @@ Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT; ]]> + + document.getAnonymousElementByAttribute(this, "anonid", + "trackingContent") + + + document.getAnonymousElementByAttribute(this, "anonid", + "trackingContentAction.unblock") + + + document.getAnonymousElementByAttribute(this, "anonid", + "trackingContentAction.block"); + + + document.getAnonymousElementByAttribute(this, "anonid", + "trackingContentProtectionDisabled") + + + document.getAnonymousElementByAttribute(this, "anonid", + "trackingContent.helplink") + + + + + + + + + + diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index b0093beca017..2777f04128af 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -737,6 +737,14 @@ just addresses the organization to follow, e.g. "This site is run by " --> + + + + + + + +