Bug 1204007 - show blocked icon in control center when they have been blocked; r=paolo draft
authorgasolin <gasolin@gmail.com>
Fri, 01 Jul 2016 11:49:59 +0800
changeset 383056 4d8f8cc16d3b58c503d4fec9fa39bdfd15ae7bbf
parent 383055 f5adfcfffa5be0d5246f9d11ed08bdae6bd8cbd4
child 524370 1fb049ca14d9dac361525d3d2327fdccc1dc0d30
push id21910
push userbmo:gasolin@mozilla.com
push dateFri, 01 Jul 2016 03:50:27 +0000
reviewerspaolo
bugs1204007
milestone50.0a1
Bug 1204007 - show blocked icon in control center when they have been blocked; r=paolo MozReview-Commit-ID: EL06AzgMrkV
browser/base/content/browser.js
browser/themes/shared/notification-icons.inc.css
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7243,18 +7243,19 @@ var gIdentityHandler = {
 
     let label = document.createElement("label");
     label.setAttribute("flex", "1");
     label.setAttribute("class", "identity-popup-permission-label");
     label.setAttribute("control", menulist.getAttribute("id"));
     label.textContent = aPermission.label;
 
     let img = document.createElement("image");
+    let isBlocked = (aPermission.state == SitePermissions.BLOCK) ? " blocked" : "";
     img.setAttribute("class",
-      "identity-popup-permission-icon " + aPermission.id + "-icon");
+      "identity-popup-permission-icon " + aPermission.id + "-icon" + isBlocked);
 
     let container = document.createElement("hbox");
     container.setAttribute("align", "center");
     container.appendChild(img);
     container.appendChild(label);
     container.appendChild(menulist);
 
     // The menuitem text can be long and we don't want the dropdown
--- a/browser/themes/shared/notification-icons.inc.css
+++ b/browser/themes/shared/notification-icons.inc.css
@@ -107,41 +107,59 @@
   fill: #fea01b;
 }
 
 .popup-notification-icon[popupid="web-notifications"],
 .desktop-notification-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#desktop-notification);
 }
 
+.desktop-notification-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#desktop-notification-blocked);
+}
+
 .geo-icon {
 %ifdef XP_MACOSX
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-osx);
 %elif defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-linux);
 %else
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-windows);
 %endif
 }
 
+.geo-icon.blocked {
+%ifdef XP_MACOSX
+  list-style-image: url(chrome://browser/skin/glyphs.svg#geo-osx-blocked);
+%elif defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
+  list-style-image: url(chrome://browser/skin/glyphs.svg#geo-linux-blocked);
+%else
+  list-style-image: url(chrome://browser/skin/glyphs.svg#geo-windows-blocked);
+%endif
+}
+
 .popup-notification-icon[popupid="geolocation"] {
 %ifdef XP_MACOSX
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-osx);
 %elif defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-linux-detailed);
 %else
   list-style-image: url(chrome://browser/skin/glyphs.svg#geo-windows-detailed);
 %endif
 }
 
 .popup-notification-icon[popupid="indexedDB-permissions-prompt"],
 .indexedDB-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#indexedDB);
 }
 
+.indexedDB-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#indexedDB-blocked);
+}
+
 .login-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#login);
 }
 
 .popup-notification-icon[popupid="password"] {
   list-style-image: url(chrome://browser/skin/glyphs.svg#login-detailed);
 }
 
@@ -153,38 +171,55 @@
 /* The first selector is used by socialchat.xml (bug 1275558). */
 .webRTC-sharingDevices-notification-icon,
 .camera-icon,
 .popup-notification-icon[popupid="webRTC-shareDevices"],
 .popup-notification-icon[popupid="webRTC-sharingDevices"] {
   list-style-image: url(chrome://browser/skin/glyphs.svg#camera);
 }
 
+.camera-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#camera-blocked);
+}
+
 /* The first selector is used by socialchat.xml (bug 1275558). */
 .webRTC-sharingMicrophone-notification-icon,
 .microphone-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#microphone);
 }
 
+.microphone-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#microphone-blocked);
+}
+
 .popup-notification-icon[popupid="webRTC-shareMicrophone"],
 .popup-notification-icon[popupid="webRTC-sharingMicrophone"] {
   list-style-image: url(chrome://browser/skin/glyphs.svg#microphone-detailed);
 }
 
 .popup-notification-icon[popupid="webRTC-shareScreen"],
 .popup-notification-icon[popupid="webRTC-sharingScreen"],
 .screen-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#screen);
 }
 
+.screen-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#screen-blocked);
+}
+
 .popup-notification-icon[popupid="pointerLock"],
 .pointerLock-icon {
   list-style-image: url(chrome://browser/skin/glyphs.svg#pointerLock);
 }
 
+.pointerLock-icon.blocked {
+  list-style-image: url(chrome://browser/skin/glyphs.svg#pointerLock-blocked);
+}
+
+/* popup icon has block sign in it already, therefore we dont need another icon */
 .popup-icon {
   list-style-image: url("chrome://browser/skin/glyphs.svg#popup");
 }
 
 /* EME */
 
 .popup-notification-icon[popupid="drmContentPlaying"],
 .drm-icon {