diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 35a9e83f530..73c617e71c0 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -757,6 +757,7 @@ pref("urlclassifier.max-complete-age", 2700);
#endif
pref("browser.geolocation.warning.infoURL", "http://www.mozilla.com/%LOCALE%/firefox/geolocation/");
+pref("browser.mixedcontent.warning.infoURL", "http://support.mozilla.org/1/%APP%/%VERSION%/%OS%/%LOCALE%/mixed-content/");
pref("browser.EULA.version", 3);
pref("browser.rights.version", 3);
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 1dea8f5699c..659b3d17b13 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6648,7 +6648,7 @@ var gIdentityHandler = {
} else if (state & nsIWebProgressListener.STATE_IS_SECURE) {
this.setMode(this.IDENTITY_MODE_DOMAIN_VERIFIED);
} else if (state & nsIWebProgressListener.STATE_IS_BROKEN) {
- if (gBrowser.docShell.hasMixedActiveContentLoaded) {
+ if (state & nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) {
this.setMode(this.IDENTITY_MODE_MIXED_ACTIVE_CONTENT);
} else {
this.setMode(this.IDENTITY_MODE_MIXED_CONTENT);
@@ -6656,6 +6656,48 @@ var gIdentityHandler = {
} else {
this.setMode(this.IDENTITY_MODE_UNKNOWN);
}
+
+ // Ensure the doorhanger is shown when mixed active content is blocked.
+ if (state & nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT)
+ this.showMixedContentDoorhanger();
+ },
+
+ /**
+ * Display the Mixed Content Blocker doohanger, providing an option
+ * to the user to override mixed content blocking
+ */
+ showMixedContentDoorhanger : function() {
+ // If we've already got an active notification, bail out to avoid showing it repeatedly.
+ if (PopupNotifications.getNotification("mixed-content-blocked", gBrowser.selectedBrowser))
+ return;
+
+ let helplink = document.getElementById("mixed-content-blocked-helplink");
+ helplink.href = Services.urlFormatter.formatURLPref("browser.mixedcontent.warning.infoURL");
+
+ let brandBundle = document.getElementById("bundle_brand");
+ let brandShortName = brandBundle.getString("brandShortName");
+ let messageString = gNavigatorBundle.getFormattedString("mixedContentBlocked.message", [brandShortName]);
+ let action = {
+ label: gNavigatorBundle.getString("mixedContentBlocked.keepBlockingButton.label"),
+ accessKey: gNavigatorBundle.getString("mixedContentBlocked.keepBlockingButton.accesskey"),
+ callback: function() { /* NOP */ }
+ };
+ let secondaryActions = [
+ {
+ label: gNavigatorBundle.getString("mixedContentBlocked.unblock.label"),
+ accessKey: gNavigatorBundle.getString("mixedContentBlocked.unblock.accesskey"),
+ callback: function() {
+ // Reload the page with the content unblocked
+ BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT);
+ }
+ }
+ ];
+ let options = {
+ dismissed: true,
+ };
+ PopupNotifications.show(gBrowser.selectedBrowser, "mixed-content-blocked",
+ messageString, "mixed-content-blocked-notification-icon",
+ action, secondaryActions, options);
},
/**
diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
index f6d4cca730c..8ba9fc9dd71 100644
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -473,6 +473,17 @@
+
+
+
+
+ &mixedContentBlocked.moreinfo;
+
+
+
+
+
#ifdef CAN_DRAW_IN_TITLEBAR
@@ -587,6 +598,7 @@
+
diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd
index e3f8fdf8bb1..dba7d98400f 100644
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -631,3 +631,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
+
+
+
diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties
index 7d2a78bf021..e60a79a0cb3 100644
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -435,3 +435,11 @@ getUserMedia.denyRequest.accesskey = D
getUserMedia.sharingCamera.message = You are currently sharing your camera with %S.
getUserMedia.sharingMicrophone.message = You are currently sharing your microphone with %S.
getUserMedia.sharingCameraAndMicrophone.message = You are currently sharing your camera and microphone with %S.
+
+# Mixed Content Blocker Doorhanger Notification
+# LOCALIZATION NOTE - %S is brandShortName
+mixedContentBlocked.message = %S has blocked content that isn't secure.
+mixedContentBlocked.keepBlockingButton.label = Keep Blocking
+mixedContentBlocked.keepBlockingButton.accesskey = B
+mixedContentBlocked.unblock.label = Disable Protection on This Page
+mixedContentBlocked.unblock.accesskey = D
diff --git a/browser/themes/gnomestripe/browser.css b/browser/themes/gnomestripe/browser.css
index 0134b8152a7..31e7b7f846a 100644
--- a/browser/themes/gnomestripe/browser.css
+++ b/browser/themes/gnomestripe/browser.css
@@ -1302,6 +1302,10 @@ toolbar[iconsize="small"] #webrtc-status-button {
}
}
+#mixed-content-blocked-notification-icon {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-16.png);
+}
+
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);
}
diff --git a/browser/themes/gnomestripe/jar.mn b/browser/themes/gnomestripe/jar.mn
index cf6a8829758..1bd34e25944 100644
--- a/browser/themes/gnomestripe/jar.mn
+++ b/browser/themes/gnomestripe/jar.mn
@@ -30,6 +30,7 @@ browser.jar:
skin/classic/browser/identity-icons-https-mixed-active.png
skin/classic/browser/Info.png
skin/classic/browser/KUI-close.png
+ skin/classic/browser/mixed-content-blocked-16.png
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
* skin/classic/browser/pageInfo.css
diff --git a/browser/themes/gnomestripe/mixed-content-blocked-16.png b/browser/themes/gnomestripe/mixed-content-blocked-16.png
new file mode 100644
index 00000000000..7cf33ec4c5a
Binary files /dev/null and b/browser/themes/gnomestripe/mixed-content-blocked-16.png differ
diff --git a/browser/themes/pinstripe/browser.css b/browser/themes/pinstripe/browser.css
index c8da29bc5ac..aec74b42ba3 100644
--- a/browser/themes/pinstripe/browser.css
+++ b/browser/themes/pinstripe/browser.css
@@ -3095,6 +3095,15 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
}
}
+#mixed-content-blocked-notification-icon {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-16.png);
+}
+@media (min-resolution: 2dppx) {
+ #mixed-content-blocked-notification-icon {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-16@2x.png);
+ }
+}
+
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);
}
@@ -3188,6 +3197,19 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
list-style-image: url(chrome://browser/skin/webapps-64.png);
}
+.popup-notification-icon[popupid="mixed-content-blocked"] {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png);
+}
+@media (min-resolution: 2dppx) {
+ .popup-notification-icon[popupid="mixed-content-blocked"] {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-64@2x.png);
+ }
+}
+
+#mixed-content-blocked-helplink {
+ margin: 0px;
+}
+
.popup-notification-icon[popupid="webRTC-sharingDevices"],
.popup-notification-icon[popupid="webRTC-shareDevices"] {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-64.png);
diff --git a/browser/themes/pinstripe/jar.mn b/browser/themes/pinstripe/jar.mn
index 2613f9b2bae..ee6cae6dc0a 100644
--- a/browser/themes/pinstripe/jar.mn
+++ b/browser/themes/pinstripe/jar.mn
@@ -40,6 +40,10 @@ browser.jar:
skin/classic/browser/KUI-close.png
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png
+ skin/classic/browser/mixed-content-blocked-16.png
+ skin/classic/browser/mixed-content-blocked-16@2x.png
+ skin/classic/browser/mixed-content-blocked-64.png
+ skin/classic/browser/mixed-content-blocked-64@2x.png
skin/classic/browser/panel-expander-closed.png
skin/classic/browser/panel-expander-closed@2x.png
skin/classic/browser/panel-expander-open.png
diff --git a/browser/themes/pinstripe/mixed-content-blocked-16.png b/browser/themes/pinstripe/mixed-content-blocked-16.png
new file mode 100644
index 00000000000..7cf33ec4c5a
Binary files /dev/null and b/browser/themes/pinstripe/mixed-content-blocked-16.png differ
diff --git a/browser/themes/pinstripe/mixed-content-blocked-16@2x.png b/browser/themes/pinstripe/mixed-content-blocked-16@2x.png
new file mode 100644
index 00000000000..c2e49b3a7fb
Binary files /dev/null and b/browser/themes/pinstripe/mixed-content-blocked-16@2x.png differ
diff --git a/browser/themes/pinstripe/mixed-content-blocked-64.png b/browser/themes/pinstripe/mixed-content-blocked-64.png
new file mode 100644
index 00000000000..cac44151407
Binary files /dev/null and b/browser/themes/pinstripe/mixed-content-blocked-64.png differ
diff --git a/browser/themes/pinstripe/mixed-content-blocked-64@2x.png b/browser/themes/pinstripe/mixed-content-blocked-64@2x.png
new file mode 100644
index 00000000000..4ef0a5cb1a2
Binary files /dev/null and b/browser/themes/pinstripe/mixed-content-blocked-64@2x.png differ
diff --git a/browser/themes/winstripe/browser.css b/browser/themes/winstripe/browser.css
index a6611525805..dc56c3e6fb5 100644
--- a/browser/themes/winstripe/browser.css
+++ b/browser/themes/winstripe/browser.css
@@ -2304,6 +2304,10 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://browser/skin/webapps-64.png);
}
+.popup-notification-icon[popupid="mixed-content-blocked"] {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-64.png);
+}
+
.popup-notification-icon[popupid="webRTC-sharingDevices"],
.popup-notification-icon[popupid="webRTC-shareDevices"] {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-64.png);
@@ -2391,6 +2395,10 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
}
}
+#mixed-content-blocked-notification-icon {
+ list-style-image: url(chrome://browser/skin/mixed-content-blocked-16.png);
+}
+
#webRTC-shareDevices-notification-icon {
list-style-image: url(chrome://browser/skin/webRTC-shareDevice-16.png);
}
diff --git a/browser/themes/winstripe/jar.mn b/browser/themes/winstripe/jar.mn
index b948cee67ab..14b4589112d 100644
--- a/browser/themes/winstripe/jar.mn
+++ b/browser/themes/winstripe/jar.mn
@@ -38,6 +38,7 @@ browser.jar:
skin/classic/browser/livemark-folder.png
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png
+ skin/classic/browser/mixed-content-blocked-16.png
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
skin/classic/browser/pageInfo.css
@@ -265,6 +266,7 @@ browser.jar:
skin/classic/aero/browser/livemark-folder.png (livemark-folder-aero.png)
skin/classic/aero/browser/menu-back.png (menu-back-aero.png)
skin/classic/aero/browser/menu-forward.png (menu-forward-aero.png)
+ skin/classic/aero/browser/mixed-content-blocked-16.png
skin/classic/aero/browser/monitor.png
skin/classic/aero/browser/monitor_16-10.png
skin/classic/aero/browser/pageInfo.css
diff --git a/browser/themes/winstripe/mixed-content-blocked-16.png b/browser/themes/winstripe/mixed-content-blocked-16.png
new file mode 100644
index 00000000000..7cf33ec4c5a
Binary files /dev/null and b/browser/themes/winstripe/mixed-content-blocked-16.png differ