Bug 1566810 - Part 1: Add the granted permission indicator on the lock icon. r=johannh
authorTim Huang <tihuang@mozilla.com>
Thu, 15 Aug 2019 14:21:27 +0000
changeset 488460 93ae831e2fb9a6ceac0f0495a280d6538fc62f21
parent 488459 22637ac7ff7f665ae02be0619c1a51fd47ef2826
child 488461 0a7463d82e5f5f3cbca589baab9abc07881f5142
push id92759
push usertihuang@mozilla.com
push dateFri, 16 Aug 2019 07:46:54 +0000
treeherderautoland@0a7463d82e5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1566810
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1566810 - Part 1: Add the granted permission indicator on the lock icon. r=johannh This patch adds a permission indictor on the lock icon and it is only shown if there is any permission has been granted. Differential Revision: https://phabricator.services.mozilla.com/D42119
browser/themes/shared/identity-block/identity-block.inc.css
--- a/browser/themes/shared/identity-block/identity-block.inc.css
+++ b/browser/themes/shared/identity-block/identity-block.inc.css
@@ -7,16 +7,18 @@
 #identity-box {
   padding-inline-start: 6px;
   padding-inline-end: 6px;
   margin-inline-end: 4px;
   /* Set default fill for icons in the identity block.
      Individual icons can override this. */
   fill: currentColor;
   fill-opacity: .6;
+  /* This is needed in order to position the permission indicator. */
+  position: relative;
 }
 
 /* The tracking protection icon will be hidden if it is a chrome page. There
    will be only the brand icon in the url bar. So, we need to change the padding
    start for proper positing the icon. */
 #urlbar[pageproxystate="valid"] > #identity-box.chromeUI {
   padding-inline-start: 8px;
 }
@@ -170,16 +172,31 @@
 }
 
 #urlbar[pageproxystate="valid"] > #identity-box.notSecure > #identity-icon,
 #urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #identity-icon,
 #urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #identity-icon {
   list-style-image: url(chrome://browser/skin/connection-mixed-active-loaded.svg);
 }
 
+#urlbar[pageproxystate="valid"] > #identity-box.grantedPermissions::before {
+  background: url(chrome://browser/skin/badge-blue.svg);
+  content: "";
+  position: absolute;
+  bottom: 15px;
+  left: 14px;
+  height: 14px;
+  width: 14px;
+}
+
+#urlbar[pageproxystate="valid"] > #identity-box.grantedPermissions:-moz-locale-dir(rtl)::before {
+  left: unset;
+  right: 16px;
+}
+
 /* SHARING ICON */
 
 #webrtc-sharing-icon[sharing="camera"] {
   list-style-image: url("chrome://browser/skin/notification-icons/camera.svg");
 }
 
 #webrtc-sharing-icon[sharing="microphone"] {
   list-style-image: url("chrome://browser/skin/notification-icons/microphone.svg");