зеркало из https://github.com/mozilla/gecko-dev.git
Bug 742419 - Implement new identity block design (browser/base, browser/app, and Windows). r=dao
This commit is contained in:
Родитель
0af78ed149
Коммит
416cc4c499
|
@ -877,7 +877,7 @@ pref("browser.ssl_override_behavior", 2);
|
|||
// 0 - do not show domain
|
||||
// 1 - show effectiveTLD + 1 (e.g. mozilla.org)
|
||||
// 2 - show full domain (e.g. bugzilla.mozilla.org)
|
||||
pref("browser.identity.ssl_domain_display", 1);
|
||||
pref("browser.identity.ssl_domain_display", 0);
|
||||
|
||||
// True if the user should be prompted when a web application supports
|
||||
// offline apps.
|
||||
|
|
|
@ -2686,30 +2686,11 @@ function SetPageProxyState(aState)
|
|||
if (aState == "valid") {
|
||||
gLastValidURLStr = gURLBar.value;
|
||||
gURLBar.addEventListener("input", UpdatePageProxyState, false);
|
||||
|
||||
PageProxySetIcon(gBrowser.getIcon());
|
||||
} else if (aState == "invalid") {
|
||||
gURLBar.removeEventListener("input", UpdatePageProxyState, false);
|
||||
PageProxyClearIcon();
|
||||
}
|
||||
}
|
||||
|
||||
function PageProxySetIcon (aURL)
|
||||
{
|
||||
if (!gProxyFavIcon)
|
||||
return;
|
||||
|
||||
if (!aURL)
|
||||
PageProxyClearIcon();
|
||||
else if (gProxyFavIcon.getAttribute("src") != aURL)
|
||||
gProxyFavIcon.setAttribute("src", aURL);
|
||||
}
|
||||
|
||||
function PageProxyClearIcon ()
|
||||
{
|
||||
gProxyFavIcon.removeAttribute("src");
|
||||
}
|
||||
|
||||
function PageProxyClickHandler(aEvent)
|
||||
{
|
||||
if (aEvent.button == 1 && gPrefService.getBoolPref("middlemouse.paste"))
|
||||
|
@ -4629,11 +4610,6 @@ var XULBrowserWindow = {
|
|||
return "_blank";
|
||||
},
|
||||
|
||||
onLinkIconAvailable: function (aIconURL) {
|
||||
if (gProxyFavIcon && gBrowser.userTypedValue === null)
|
||||
PageProxySetIcon(aIconURL); // update the favicon in the URL bar
|
||||
},
|
||||
|
||||
onProgressChange: function (aWebProgress, aRequest,
|
||||
aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress) {
|
||||
|
|
|
@ -542,9 +542,8 @@
|
|||
<hbox id="identity-box-inner" align="center">
|
||||
<hbox id="page-proxy-stack"
|
||||
onclick="PageProxyClickHandler(event);">
|
||||
<image id="page-proxy-favicon" validate="never"
|
||||
pageproxystate="invalid"
|
||||
onerror="this.removeAttribute('src');"/>
|
||||
<image id="page-proxy-favicon"
|
||||
pageproxystate="invalid"/>
|
||||
</hbox>
|
||||
<hbox id="identity-icon-labels">
|
||||
<label id="identity-icon-label" class="plain" flex="1"/>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/* Tests for correct behaviour of getEffectiveHost on identity handler */
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
registerCleanupFunction(function() {
|
||||
Services.prefs.clearUserPref("browser.identity.ssl_domain_display");
|
||||
});
|
||||
|
||||
ok(gIdentityHandler, "gIdentityHandler should exist");
|
||||
|
||||
|
@ -72,34 +75,48 @@ let gCurrentTest, gCurrentTestIndex = -1, gTestDesc;
|
|||
// Go through the tests in both directions, to add additional coverage for
|
||||
// transitions between different states.
|
||||
let gForward = true;
|
||||
let gCheckETLD = false;
|
||||
function nextTest() {
|
||||
if (gForward)
|
||||
gCurrentTestIndex++;
|
||||
else
|
||||
gCurrentTestIndex--;
|
||||
if (!gCheckETLD) {
|
||||
if (gForward)
|
||||
gCurrentTestIndex++;
|
||||
else
|
||||
gCurrentTestIndex--;
|
||||
|
||||
if (gCurrentTestIndex == tests.length) {
|
||||
// Went too far, reverse
|
||||
gCurrentTestIndex--;
|
||||
gForward = false;
|
||||
if (gCurrentTestIndex == tests.length) {
|
||||
// Went too far, reverse
|
||||
gCurrentTestIndex--;
|
||||
gForward = false;
|
||||
}
|
||||
|
||||
if (gCurrentTestIndex == -1) {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", checkResult, true);
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
gCurrentTest = tests[gCurrentTestIndex];
|
||||
gTestDesc = "#" + gCurrentTestIndex + " (" + gCurrentTest.name + ")";
|
||||
if (!gForward)
|
||||
gTestDesc += " (second time)";
|
||||
if (gCurrentTest.isHTTPS) {
|
||||
gCheckETLD = true;
|
||||
Services.prefs.setIntPref("browser.identity.ssl_domain_display", 1);
|
||||
}
|
||||
content.location = gCurrentTest.location;
|
||||
} else {
|
||||
gCheckETLD = false;
|
||||
gTestDesc = "#" + gCurrentTestIndex + " (" + gCurrentTest.name + " without eTLD in identity icon label)";
|
||||
if (!gForward)
|
||||
gTestDesc += " (second time)";
|
||||
Services.prefs.clearUserPref("browser.identity.ssl_domain_display");
|
||||
content.location.reload(true);
|
||||
}
|
||||
|
||||
if (gCurrentTestIndex == -1) {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", checkResult, true);
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
gCurrentTest = tests[gCurrentTestIndex];
|
||||
gTestDesc = "#" + gCurrentTestIndex + " (" + gCurrentTest.name + ")";
|
||||
if (!gForward)
|
||||
gTestDesc += " (second time)";
|
||||
content.location = gCurrentTest.location;
|
||||
}
|
||||
|
||||
function checkResult() {
|
||||
if (gCurrentTest.isHTTPS) {
|
||||
if (gCurrentTest.isHTTPS && Services.prefs.getIntPref("browser.identity.ssl_domain_display") == 1) {
|
||||
// Check that the effective host is displayed in the UI
|
||||
let label = document.getElementById("identity-icon-label");
|
||||
is(label.value, gCurrentTest.effectiveHost, "effective host is displayed in identity icon label for test " + gTestDesc);
|
||||
|
|
|
@ -1343,9 +1343,6 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
|
|||
/* identity box */
|
||||
|
||||
#identity-box {
|
||||
background-image: -moz-linear-gradient(hsl(0,0%,98%), hsl(0,0%,92%));
|
||||
box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset;
|
||||
-moz-border-end: 1px solid hsla(0,0%,0%,.1);
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
|
@ -1393,51 +1390,10 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
|
|||
padding-right: 5.01px;
|
||||
}
|
||||
|
||||
#identity-box:hover {
|
||||
background-image: -moz-linear-gradient(hsl(0,0%,95%), hsl(0,0%,87%));
|
||||
}
|
||||
|
||||
#identity-box[open="true"],
|
||||
#identity-box:hover:active {
|
||||
background-image: -moz-linear-gradient(hsl(0,0%,92%), hsl(0,0%,82%));
|
||||
box-shadow: 0 1px 1px hsla(0,0%,0%,.3) inset,
|
||||
0 1px 3px hsla(0,0%,0%,.3) inset;
|
||||
}
|
||||
|
||||
#identity-box.verifiedDomain {
|
||||
background-image: -moz-linear-gradient(hsl(215,60%,92%), hsl(215,58%,88%));
|
||||
box-shadow: 0 1px 0 hsla(215,54%,33%,.05) inset;
|
||||
-moz-border-end-color: hsla(215,54%,33%,.2);
|
||||
color: hsl(215,54%,33%);
|
||||
}
|
||||
|
||||
#identity-box.verifiedDomain:hover {
|
||||
background-image: -moz-linear-gradient(hsl(215,85%,85%), hsl(215,70%,68%));
|
||||
}
|
||||
|
||||
#identity-box.verifiedDomain[open="true"],
|
||||
#identity-box.verifiedDomain:hover:active {
|
||||
background-image: -moz-linear-gradient(hsl(215,80%,80%), hsl(215,67%,65%));
|
||||
box-shadow: 0 1px 1px hsla(215,54%,33%,.7) inset,
|
||||
0 1px 3px 1px hsla(215,54%,33%,.5) inset;
|
||||
}
|
||||
|
||||
#identity-box.verifiedIdentity {
|
||||
background-image: -moz-linear-gradient(hsl(91,70%,90%), hsl(93,60%,81%));
|
||||
box-shadow: 0 1px 0 hsla(92,81%,16%,.05) inset;
|
||||
-moz-border-end-color: hsla(92,81%,16%,.2);
|
||||
background-color: #fff;
|
||||
color: hsl(92,100%,20%);
|
||||
}
|
||||
|
||||
#identity-box.verifiedIdentity:hover {
|
||||
background-image: -moz-linear-gradient(hsl(92,69%,77%), hsl(92,44%,51%));
|
||||
}
|
||||
|
||||
#identity-box.verifiedIdentity[open="true"],
|
||||
#identity-box.verifiedIdentity:hover:active {
|
||||
background-image: -moz-linear-gradient(hsl(92,65%,70%), hsl(92,40%,48%));
|
||||
box-shadow: 0 1px 1px hsla(92,81%,16%,.6) inset,
|
||||
0 1px 3px 1px hsla(92,81%,16%,.5) inset;
|
||||
-moz-border-end: 1px solid hsla(92,81%,16%,.2);
|
||||
}
|
||||
|
||||
#identity-box:-moz-focusring {
|
||||
|
@ -1446,7 +1402,7 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
|
|||
}
|
||||
|
||||
#identity-icon-labels {
|
||||
-moz-margin-start: 1px;
|
||||
-moz-margin-start: 5px;
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
|
@ -1482,11 +1438,29 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
|
|||
#page-proxy-favicon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 1px 4px;
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: 0;
|
||||
list-style-image: url(chrome://browser/skin/identity-icons-generic.png);
|
||||
-moz-image-region: rect(0, 16px, 16px, 0);
|
||||
}
|
||||
|
||||
#page-proxy-favicon:not([src]) {
|
||||
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
|
||||
.verifiedDomain > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
|
||||
list-style-image: url(chrome://browser/skin/identity-icons-https.png);
|
||||
}
|
||||
|
||||
.verifiedIdentity > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
|
||||
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
|
||||
}
|
||||
|
||||
#identity-box:hover > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
|
||||
-moz-image-region: rect(0, 32px, 16px, 16px);
|
||||
}
|
||||
|
||||
#identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon,
|
||||
#identity-box[open=true] > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
|
||||
-moz-image-region: rect(0, 48px, 16px, 32px);
|
||||
}
|
||||
|
||||
#page-proxy-favicon[pageproxystate="invalid"] {
|
||||
|
@ -2190,7 +2164,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
#identity-popup-content-host ,
|
||||
#identity-popup-content-host,
|
||||
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 965 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 900 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 553 B |
|
@ -25,6 +25,9 @@ browser.jar:
|
|||
skin/classic/browser/webapps-64.png
|
||||
skin/classic/browser/Info.png (Info.png)
|
||||
skin/classic/browser/identity.png (identity.png)
|
||||
skin/classic/browser/identity-icons-generic.png
|
||||
skin/classic/browser/identity-icons-https.png
|
||||
skin/classic/browser/identity-icons-https-ev.png
|
||||
skin/classic/browser/keyhole-forward-mask.svg
|
||||
skin/classic/browser/KUI-background.png
|
||||
skin/classic/browser/KUI-close.png
|
||||
|
@ -205,6 +208,9 @@ browser.jar:
|
|||
skin/classic/aero/browser/webapps-64.png
|
||||
skin/classic/aero/browser/Info.png (Info-aero.png)
|
||||
skin/classic/aero/browser/identity.png (identity-aero.png)
|
||||
skin/classic/aero/browser/identity-icons-generic.png
|
||||
skin/classic/aero/browser/identity-icons-https.png
|
||||
skin/classic/aero/browser/identity-icons-https-ev.png
|
||||
skin/classic/aero/browser/keyhole-forward-mask.svg
|
||||
skin/classic/aero/browser/KUI-background.png
|
||||
skin/classic/aero/browser/KUI-close.png
|
||||
|
|
Загрузка…
Ссылка в новой задаче