Bug 1204007 - Part 2 - Cross out permission icons in the Control Center when they have been blocked. r=paolo

MozReview-Commit-ID: EL06AzgMrkV

--HG--
extra : rebase_source : 9670637f24a7c5d8e3d1adc87e3ad2cf988d041d
This commit is contained in:
gasolin 2016-07-05 13:57:32 +01:00
parent 51cd2bf5a7
commit 8d2ba71337
2 changed files with 37 additions and 1 deletions

View File

@ -7248,8 +7248,9 @@ var gIdentityHandler = {
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");

View File

@ -112,6 +112,10 @@
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);
@ -122,6 +126,16 @@
%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);
@ -137,6 +151,10 @@
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);
}
@ -158,12 +176,20 @@
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);
@ -175,11 +201,20 @@
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);
}
/* This icon has a block sign in it, so we don't need a blocked version. */
.popup-icon {
list-style-image: url("chrome://browser/skin/glyphs.svg#popup");
}