Bug 1206233 - Implement the animated sharing indicator above the control center (i) icon, r=johannh.

This commit is contained in:
Florian Quèze 2016-08-09 22:50:52 +02:00
Родитель 590069a9df
Коммит e30efdb17b
4 изменённых файлов: 56 добавлений и 0 удалений

Просмотреть файл

@ -6777,6 +6777,14 @@ var gIdentityHandler = {
this.refreshIdentityBlock();
},
updateSharingIndicator() {
let sharing = gBrowser.selectedTab.getAttribute("sharing");
if (sharing)
this._identityBox.setAttribute("sharing", sharing);
else
this._identityBox.removeAttribute("sharing");
},
/**
* Attempt to provide proper IDN treatment for host names
*/

Просмотреть файл

@ -706,6 +706,7 @@
<image id="identity-icon"
consumeanchor="identity-box"
onclick="PageProxyClickHandler(event);"/>
<image id="sharing-icon" mousethrough="always"/>
<box id="blocked-permissions-container" align="center" tooltiptext="">
<image data-permission-id="geo" class="notification-anchor-icon geo-icon blocked" role="button"
aria-label="&urlbar.geolocationNotificationAnchor.label;"/>

Просмотреть файл

@ -1225,6 +1225,7 @@
}
updateUserContextUIIndicator();
gIdentityHandler.updateSharingIndicator();
this.tabContainer._setPositionalAttributes();
@ -1380,6 +1381,9 @@
else
tab.removeAttribute("sharing");
this._tabAttrModified(tab, ["sharing"]);
if (aBrowser == this.mCurrentBrowser)
gIdentityHandler.updateSharingIndicator();
]]></body>
</method>

Просмотреть файл

@ -94,6 +94,49 @@
opacity: 1;
}
/* SHARING ICON */
#sharing-icon {
width: 16px;
height: 16px;
margin-inline-start: -16px;
position: relative;
display: none;
}
#identity-box[sharing="camera"] > #sharing-icon {
list-style-image: url("chrome://browser/skin/notification-icons.svg#camera");
}
#identity-box[sharing="microphone"] > #sharing-icon {
list-style-image: url("chrome://browser/skin/notification-icons.svg#microphone");
}
#identity-box[sharing="screen"] > #sharing-icon {
list-style-image: url("chrome://browser/skin/notification-icons.svg#screen");
}
#identity-box[sharing] > #sharing-icon {
display: -moz-box;
filter: url("chrome://browser/skin/filters.svg#fill");
fill: rgb(224, 41, 29);
animation-delay: -1.5s;
}
#identity-box[sharing] > #identity-icon,
#sharing-icon {
animation: 3s linear pulse infinite;
}
@keyframes pulse {
0%, 16.66%, 83.33%, 100% {
opacity: 0;
}
33.33%, 66.66% {
opacity: 1;
}
}
/* TRACKING PROTECTION ICON */
#tracking-protection-icon {