зеркало из https://github.com/mozilla/pjs.git
Bug 455334 - Improve truncation and RTL display of EV cert owner strings in location bar. r=dao
--HG-- extra : rebase_source : ea62e191112ab31a79ec845e1e382de5eb9e4e62
This commit is contained in:
Родитель
4f07e6de41
Коммит
a1da6740ee
|
@ -76,9 +76,16 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
|
|||
visibility: collapse;
|
||||
}
|
||||
|
||||
#identity-box-inner {
|
||||
max-width: 22em;
|
||||
min-width: 1px;
|
||||
#identity-icon-labels {
|
||||
max-width: 18em;
|
||||
}
|
||||
|
||||
#identity-icon-country-label {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
#identity-box.verifiedIdentity > hbox > #identity-icon-labels > #identity-icon-label {
|
||||
-moz-margin-end: 0.25em !important;
|
||||
}
|
||||
|
||||
#wrapper-search-container > #search-container > #searchbar > .searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input {
|
||||
|
|
|
@ -6665,6 +6665,10 @@ var gIdentityHandler = {
|
|||
return this._overrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
},
|
||||
get _identityIconCountryLabel () {
|
||||
delete this._identityIconCountryLabel;
|
||||
return this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
|
||||
},
|
||||
|
||||
/**
|
||||
* Rebuild cache of the elements that may or may not exist depending
|
||||
|
@ -6673,8 +6677,10 @@ var gIdentityHandler = {
|
|||
_cacheElements : function() {
|
||||
delete this._identityBox;
|
||||
delete this._identityIconLabel;
|
||||
delete this._identityIconCountryLabel;
|
||||
this._identityBox = document.getElementById("identity-box");
|
||||
this._identityIconLabel = document.getElementById("identity-icon-label");
|
||||
this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -6799,6 +6805,8 @@ var gIdentityHandler = {
|
|||
// let's just use that. Check the pref to determine how much of the verified
|
||||
// hostname to show
|
||||
var icon_label = "";
|
||||
var icon_country_label = "";
|
||||
var icon_labels_dir = "ltr";
|
||||
switch (gPrefService.getIntPref("browser.identity.ssl_domain_display")) {
|
||||
case 2 : // Show full domain
|
||||
icon_label = this._lastLocation.hostname;
|
||||
|
@ -6829,23 +6837,37 @@ var gIdentityHandler = {
|
|||
}
|
||||
else if (newMode == this.IDENTITY_MODE_IDENTIFIED) {
|
||||
// If it's identified, then we can populate the dialog with credentials
|
||||
iData = this.getIdentityData();
|
||||
iData = this.getIdentityData();
|
||||
tooltip = gNavigatorBundle.getFormattedString("identity.identified.verifier",
|
||||
[iData.caOrg]);
|
||||
icon_label = iData.subjectOrg;
|
||||
if (iData.country)
|
||||
icon_label = gNavigatorBundle.getFormattedString("identity.identified.title_with_country",
|
||||
[iData.subjectOrg, iData.country]);
|
||||
else
|
||||
icon_label = iData.subjectOrg;
|
||||
icon_country_label = "(" + iData.country + ")";
|
||||
// If the organization name starts with an RTL character, then
|
||||
// swap the positions of the organization and country code labels.
|
||||
// The Unicode ranges reflect the definition of the UCS2_CHAR_IS_BIDI
|
||||
// macro in intl/unicharutil/util/nsBidiUtils.h. When bug 218823 gets
|
||||
// fixed, this test should be replaced by one adhering to the
|
||||
// Unicode Bidirectional Algorithm proper (at the paragraph level).
|
||||
icon_labels_dir = /^[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufefc]/.test(icon_label) ?
|
||||
"rtl" : "ltr";
|
||||
}
|
||||
else {
|
||||
tooltip = gNavigatorBundle.getString("identity.unknown.tooltip");
|
||||
icon_label = "";
|
||||
icon_country_label = "";
|
||||
icon_labels_dir = "ltr";
|
||||
}
|
||||
|
||||
// Push the appropriate strings out to the UI
|
||||
this._identityBox.tooltipText = tooltip;
|
||||
this._identityIconLabel.value = icon_label;
|
||||
this._identityIconCountryLabel.value = icon_country_label;
|
||||
// Set cropping and direction
|
||||
this._identityIconLabel.crop = icon_country_label ? "end" : "center";
|
||||
this._identityIconLabel.parentNode.style.direction = icon_labels_dir;
|
||||
// Hide completely if the organization label is empty
|
||||
this._identityIconLabel.parentNode.hidden = icon_label ? false : true;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -423,7 +423,10 @@
|
|||
ondragstart="proxyIconDNDObserver.onDragStart(event);"
|
||||
onerror="this.removeAttribute('src');"/>
|
||||
</stack>
|
||||
<label id="identity-icon-label" crop="center" flex="1"/>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
<label id="identity-icon-country-label" class="plain"/>
|
||||
</hbox>
|
||||
</hbox>
|
||||
</box>
|
||||
<hbox id="urlbar-icons">
|
||||
|
|
|
@ -158,7 +158,6 @@ offlineApps.manageUsageAccessKey=S
|
|||
identity.identified.verifier=Verified by: %S
|
||||
identity.identified.verified_by_you=You have added a security exception for this site.
|
||||
identity.identified.state_and_country=%S, %S
|
||||
identity.identified.title_with_country=%S (%S)
|
||||
|
||||
identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping.
|
||||
identity.unencrypted=Your connection to this web site is not encrypted.
|
||||
|
|
|
@ -866,13 +866,8 @@ toolbar[iconsize="small"] #fullscreen-button {
|
|||
background-color: rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
#identity-icon-label {
|
||||
#identity-icon-labels {
|
||||
padding: 0 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#identity-icon-label[value=""] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#identity-box.verifiedDomain {
|
||||
|
|
|
@ -798,14 +798,10 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
|
|||
background-image: -moz-linear-gradient(top, #EBF8D2, #D3EEA1 1px, #AAD77B 50%, #96CB60 50%, #6EB142);
|
||||
}
|
||||
|
||||
#identity-icon-label {
|
||||
#identity-icon-labels {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#identity-box.unknownIdentity > hbox > #identity-icon-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box,
|
||||
#urlbar > .autocomplete-textbox-container > .textbox-input-box {
|
||||
-moz-margin-end: 0;
|
||||
|
@ -887,7 +883,7 @@ toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarke
|
|||
max-width: 20em;
|
||||
}
|
||||
|
||||
#wrapper-urlbar-container #identity-icon-label,
|
||||
#wrapper-urlbar-container #identity-icon-labels,
|
||||
#wrapper-urlbar-container .autocomplete-history-dropmarker > .dropmarker-icon {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1406,13 +1406,8 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
outline: 1px dotted white;
|
||||
}
|
||||
|
||||
#identity-icon-label {
|
||||
#identity-icon-labels {
|
||||
padding: 0 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#identity-icon-label[value=""] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Popup Icons */
|
||||
|
|
Загрузка…
Ссылка в новой задаче