Bug 1184060 - Anchor the Control Center to the middle of the icons in the identity block. r=ttaubert

This commit is contained in:
Paolo Amadini 2015-07-28 14:51:19 +01:00
parent 5a23db23ed
commit 21aa6b2dae
3 changed files with 27 additions and 15 deletions

View File

@ -6696,6 +6696,10 @@ var gIdentityHandler = {
delete this._identityIconCountryLabel;
return this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
},
get _identityIcons () {
delete this._identityIcons;
return this._identityIcons = document.getElementById("identity-icons");
},
get _identityIcon () {
delete this._identityIcon;
return this._identityIcon = document.getElementById("page-proxy-favicon");
@ -6715,12 +6719,14 @@ var gIdentityHandler = {
*/
_cacheElements : function() {
delete this._identityBox;
delete this._identityIcons;
delete this._identityIconLabel;
delete this._identityIconCountryLabel;
delete this._identityIcon;
delete this._permissionsContainer;
delete this._permissionList;
this._identityBox = document.getElementById("identity-box");
this._identityIcons = document.getElementById("identity-icons");
this._identityIconLabel = document.getElementById("identity-icon-label");
this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
this._identityIcon = document.getElementById("page-proxy-favicon");
@ -7130,7 +7136,7 @@ var gIdentityHandler = {
this._identityBox.setAttribute("open", "true");
// Now open the popup, anchored off the primary chrome element
this._identityPopup.openPopup(this._identityIcon, "bottomcenter topleft");
this._identityPopup.openPopup(this._identityIcons, "bottomcenter topleft");
},
onPopupShown(event) {

View File

@ -763,11 +763,13 @@
onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
ondragstart="gIdentityHandler.onDragStart(event);">
<image id="tracking-protection-icon"/>
<image id="page-proxy-favicon"
consumeanchor="identity-box"
onclick="PageProxyClickHandler(event);"
pageproxystate="invalid"/>
<hbox id="identity-icons"
consumeanchor="identity-box">
<image id="tracking-protection-icon"/>
<image id="page-proxy-favicon"
onclick="PageProxyClickHandler(event);"
pageproxystate="invalid"/>
</hbox>
<hbox id="identity-icon-labels">
<label id="identity-icon-label" class="plain" flex="1"/>
<label id="identity-icon-country-label" class="plain"/>

View File

@ -111,6 +111,10 @@
transition: none;
}
#urlbar[pageproxystate="invalid"] > #identity-box > #identity-icons > #tracking-protection-icon {
visibility: collapse;
}
/* MAIN IDENTITY ICON */
#page-proxy-favicon {
@ -119,26 +123,26 @@
list-style-image: url(chrome://browser/skin/identity-not-secure.svg);
}
.chromeUI > #page-proxy-favicon[pageproxystate="valid"] {
.chromeUI > #identity-icons > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
}
.verifiedDomain > #page-proxy-favicon[pageproxystate="valid"],
.verifiedIdentity > #page-proxy-favicon[pageproxystate="valid"] {
.verifiedDomain > #identity-icons > #page-proxy-favicon[pageproxystate="valid"],
.verifiedIdentity > #identity-icons > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-secure.svg);
}
.mixedActiveContent > #page-proxy-favicon[pageproxystate="valid"] {
.mixedActiveContent > #identity-icons > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-mixed-active-loaded.svg);
}
.weakCipher > #page-proxy-favicon[pageproxystate="valid"],
.mixedDisplayContent > #page-proxy-favicon[pageproxystate="valid"],
.mixedDisplayContentLoadedActiveBlocked > #page-proxy-favicon[pageproxystate="valid"] {
.weakCipher > #identity-icons > #page-proxy-favicon[pageproxystate="valid"],
.mixedDisplayContent > #identity-icons > #page-proxy-favicon[pageproxystate="valid"],
.mixedDisplayContentLoadedActiveBlocked > #identity-icons > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-mixed-passive-loaded.svg);
}
.mixedActiveBlocked > #page-proxy-favicon[pageproxystate="valid"] {
.mixedActiveBlocked > #identity-icons > #page-proxy-favicon[pageproxystate="valid"] {
list-style-image: url(chrome://browser/skin/identity-mixed-active-blocked.svg);
}
@ -146,7 +150,7 @@
opacity: 0.3;
}
#urlbar[actiontype="searchengine"] > #identity-box > #page-proxy-favicon {
#urlbar[actiontype="searchengine"] > #identity-box > #identity-icons > #page-proxy-favicon {
-moz-image-region: inherit;
list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon);
width: 16px;