зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206233 - Implement the animated sharing indicator above the control center (i) icon, r=johannh.
This commit is contained in:
Родитель
40b39ddc7b
Коммит
0a3e0145da
|
@ -6777,6 +6777,14 @@ var gIdentityHandler = {
|
||||||
this.refreshIdentityBlock();
|
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
|
* Attempt to provide proper IDN treatment for host names
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -706,6 +706,7 @@
|
||||||
<image id="identity-icon"
|
<image id="identity-icon"
|
||||||
consumeanchor="identity-box"
|
consumeanchor="identity-box"
|
||||||
onclick="PageProxyClickHandler(event);"/>
|
onclick="PageProxyClickHandler(event);"/>
|
||||||
|
<image id="sharing-icon" mousethrough="always"/>
|
||||||
<box id="blocked-permissions-container" align="center" tooltiptext="">
|
<box id="blocked-permissions-container" align="center" tooltiptext="">
|
||||||
<image data-permission-id="geo" class="notification-anchor-icon geo-icon blocked" role="button"
|
<image data-permission-id="geo" class="notification-anchor-icon geo-icon blocked" role="button"
|
||||||
aria-label="&urlbar.geolocationNotificationAnchor.label;"/>
|
aria-label="&urlbar.geolocationNotificationAnchor.label;"/>
|
||||||
|
|
|
@ -1225,6 +1225,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUserContextUIIndicator();
|
updateUserContextUIIndicator();
|
||||||
|
gIdentityHandler.updateSharingIndicator();
|
||||||
|
|
||||||
this.tabContainer._setPositionalAttributes();
|
this.tabContainer._setPositionalAttributes();
|
||||||
|
|
||||||
|
@ -1380,6 +1381,9 @@
|
||||||
else
|
else
|
||||||
tab.removeAttribute("sharing");
|
tab.removeAttribute("sharing");
|
||||||
this._tabAttrModified(tab, ["sharing"]);
|
this._tabAttrModified(tab, ["sharing"]);
|
||||||
|
|
||||||
|
if (aBrowser == this.mCurrentBrowser)
|
||||||
|
gIdentityHandler.updateSharingIndicator();
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,49 @@
|
||||||
opacity: 1;
|
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 */
|
||||||
|
|
||||||
#tracking-protection-icon {
|
#tracking-protection-icon {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче