diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2116107221b..1f58d907146 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3679,8 +3679,9 @@ nsBrowserStatusHandler.prototype = var securityUI = gBrowser.securityUI; this.securityButton.setAttribute("tooltiptext", securityUI.tooltipText); - - getIdentityHandler().checkIdentity(aState); + var lockIcon = document.getElementById("lock-icon"); + if (lockIcon) + lockIcon.setAttribute("tooltiptext", securityUI.tooltipText); }, // simulate all change notifications after switching tabs @@ -5662,11 +5663,8 @@ IdentityHandler.prototype = { */ checkIdentity : function(state) { var currentURI = gBrowser.currentURI; - if (currentURI.schemeIs("http")) { - if (!this._lastURI.schemeIs("http")) - this.setMode(this.IDENTITY_MODE_UNKNOWN); + if (currentURI.schemeIs("http") && this._lastURI.schemeIs("http")) return; - } var currentStatus = gBrowser.securityUI .QueryInterface(Components.interfaces.nsISSLStatusProvider) diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index a559acd106d..0dd20620629 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -28,7 +28,6 @@ # Joe Hewitt # Pierre Chanial # Dean Tessman -# Johnathan Nightingale # # Alternatively, the contents of this file may be used under the terms of # either the GNU General Public License Version 2 or later (the "GPL"), or @@ -137,34 +136,6 @@ - - - @@ -260,25 +231,19 @@ oninput="gBrowser.userTypedValue = this.value" ontextentered="return handleURLBarCommand(param);" ontextreverted="return handleURLBarRevert();"> - - - - - - - + + + + + #ifdef MOZ_SAFE_BROWSING - + diff --git a/browser/components/safebrowsing/content/phishing-afterload-displayer.js b/browser/components/safebrowsing/content/phishing-afterload-displayer.js index 09aa7d803f2..a0b3ecf3398 100644 --- a/browser/components/safebrowsing/content/phishing-afterload-displayer.js +++ b/browser/components/safebrowsing/content/phishing-afterload-displayer.js @@ -208,6 +208,7 @@ PROT_PhishMsgDisplayerBase.prototype.browserSelected = function() { this.messageShouldShow_ = true; } + this.hideLockIcon_(); // Comes back when we are unselected or unloaded this.addWarningInUrlbar_(); // Goes away when we are unselected or unloaded // messageShouldShow might be false if the user dismissed the warning, @@ -233,6 +234,7 @@ PROT_PhishMsgDisplayerBase.prototype.explicitShow = function() { */ PROT_PhishMsgDisplayerBase.prototype.browserUnselected = function() { this.removeWarningInUrlbar_(); + this.unhideLockIcon_(); if (this.messageShowing_) this.hideMessage_(); } @@ -288,6 +290,7 @@ PROT_PhishMsgDisplayerBase.prototype.done = function() { // If we were started, we must be the current problem, so these things // must be showing this.removeWarningInUrlbar_(); + this.unhideLockIcon_(); // Could be though that they've closed the warning dialog if (this.messageShowing_) @@ -324,6 +327,28 @@ PROT_PhishMsgDisplayerBase.prototype.removeIfExists_ = function(orig, return orig; } +/** + * We don't want to confuse users if they land on a phishy page that uses + * SSL, so ensure that the lock icon never shows when we're showing our + * warning. + */ +PROT_PhishMsgDisplayerBase.prototype.hideLockIcon_ = function() { + var lockIcon = this.doc_.getElementById("lock-icon"); + if (!lockIcon) + return; + lockIcon.hidden = true; +} + +/** + * Ensure they can see it after our warning is finished. + */ +PROT_PhishMsgDisplayerBase.prototype.unhideLockIcon_ = function() { + var lockIcon = this.doc_.getElementById("lock-icon"); + if (!lockIcon) + return; + lockIcon.hidden = false; +} + /** * This method makes our warning icon visible in the location bar. It will * be removed only when the problematic document is navigated awy from diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index ab572e4bb24..436fe645135 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -350,5 +350,3 @@ - - diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index 97f1ec0e284..b3a266bbc64 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -101,20 +101,3 @@ chromelessWindow.accessKey=S # Star button starButtonOn.tooltip=Edit this bookmark starButtonOff.tooltip=Bookmark this page - -# Identity information -identity.domainverified.title=Location Verified -identity.domainverified.body=You are currently visiting: -identity.domainverified.supplemental=Information identifying the owner of this web site may not have been validated. - -identity.identified.title=Identity Verified -identity.identified.body=This web site is owned by: -identity.identified.verifier=Verified by: %S -identity.identified.state_and_country=%S, %S -identity.identified.title_with_country=%S (%S) - -identity.unknown.title=Identity Unknown -identity.unknown.body=This web site does not supply identity information. - -identity.encrypted=Your connection to this web site is encrypted to prevent eavesdropping. -identity.unencrypted=Your connection to this web site is not encrypted. diff --git a/browser/locales/en-US/chrome/browser/pageInfo.dtd b/browser/locales/en-US/chrome/browser/pageInfo.dtd index 58234589a9a..7542e380914 100644 --- a/browser/locales/en-US/chrome/browser/pageInfo.dtd +++ b/browser/locales/en-US/chrome/browser/pageInfo.dtd @@ -112,7 +112,7 @@ - + diff --git a/browser/themes/pinstripe/browser/browser.css b/browser/themes/pinstripe/browser/browser.css index e378cc35188..a8f9281ba87 100755 --- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -827,7 +827,7 @@ toolbar[iconsize="small"] #paste-button:hover:active { #urlbar { margin-top: 5px; margin-bottom: 5px; - -moz-margin-start: 0px; + -moz-margin-start: 4px; -moz-margin-end: 0px; width: 7em; min-width: 7em; @@ -879,6 +879,46 @@ toolbar[iconsize="small"] #paste-button:hover:active { background: url("chrome://browser/skin/Secure-background.gif") #FFFED8 repeat-x; } +#urlbar #lock-icon { + height: 18px; + margin: -1px; +} + +#urlbar[level="high"] #lock-icon { + list-style-image: url("chrome://browser/skin/Secure.png"); + -moz-image-region: rect(0px, 18px, 18px, 0px); +} +#urlbar[level="high"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); +} +#urlbar[level="high"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); +} + +#urlbar[level="low"] #lock-icon { + list-style-image: url("chrome://browser/skin/Secure.png"); + -moz-image-region: rect(0px, 18px, 18px, 0px); +} +#urlbar[level="low"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); +} +#urlbar[level="low"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); +} + +#urlbar[level="broken"] #lock-icon { + list-style-image: url("chrome://browser/skin/Security-broken.png"); + -moz-image-region: rect(0px, 18px, 18px, 0px); +} + +#urlbar[level="broken"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); +} + +#urlbar[level="broken"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); +} + #urlbar-container { -moz-padding-end: 5px; } @@ -1663,116 +1703,3 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight !important; } -/* ::::: Identity Indicator Styling ::::: */ -/* Location bar visuals*/ -#identity-box { - /* Extend our margins out so that our highlight/separator bar covers the - location bar properly */ - margin: -1px 0 -2px; - padding: 1px 2px 2px 0; - border-right: 1px solid #888; - background-color: white; - opacity: 0.9; -} - -#identity-box:hover { - opacity: 1.0; -} - -#identity-box.verifiedIdentity { - background-color: #BFA; -} - -#urlbar[level="high"] > #identity-box, -#urlbar[level="low"] > #identity-box { - /* urlbar adds padding when security level is set, which we need to - counteract here so that we still fill the background. */ - margin: -2px; - padding: 1px 2px 2px; -} - -#identity-icon-label { - padding: 2px 2px 1px; - margin: 0; - color: black; - vertical-align: middle; -} - -.unknownIdentity > #identity-icon-label { - display: none; -} - -/* Popup Icons */ -#identity-popup-icon { - height: 64px; - width: 64px; - padding: 0; - margin: 10px 0 0; - list-style-image: url("chrome://browser/skin/identity.png"); - -moz-image-region: rect(0px, 64px, 64px, 0px); -} - -.verifiedDomain > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(64px, 64px, 128px, 0px); -} - -.verifiedIdentity > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(128px, 64px, 192px, 0px); -} - -/* Popup Title */ -#identity-popup-title { - font-size: 120%; - font-weight: bold; -} - -.verifiedIdentity > #identity-popup-title { - color: #6A6; -} - -.unknownIdentity > #identity-popup-title { - color: #999; -} - -.verifiedDomain > #identity-popup-title { - color: black; -} - -/* Popup Body Text */ -#identity-popup-content-box > description, -#identity-popup-encryption-label { - white-space: -moz-pre-wrap; - color: black; - padding-left: 10px; -} - -#identity-popup-content { - padding-top: 5px; - margin-bottom: 0; - max-width: 200px; -} - -.verifiedIdentity > #identity-popup-content, -.verifiedDomain > #identity-popup-content { - font-size: 140%; - font-weight: bold; - max-width: 300px; -} - -#identity-popup-encryption { - margin: 10px 0; -} - -.verifiedIdentity > #identity-popup-encryption > * > #identity-popup-encryption-icon, -.verifiedDomain > #identity-popup-encryption > * >#identity-popup-encryption-icon { - list-style-image: url("chrome://browser/skin/Secure.png"); - -moz-image-region: rect(0px, 18px, 18px, 0px); -} - -/* Popup Bounding Box */ -#identity-popup-container { - background-image: none; - background-color: white; - min-width: 280px; - padding: 10px; -} diff --git a/browser/themes/pinstripe/browser/jar.mn b/browser/themes/pinstripe/browser/jar.mn index 0ccdac4b5e3..e6ba6c4d8f5 100644 --- a/browser/themes/pinstripe/browser/jar.mn +++ b/browser/themes/pinstripe/browser/jar.mn @@ -10,7 +10,6 @@ classic.jar: skin/classic/browser/find.png skin/classic/browser/find-bar-background.png skin/classic/browser/Go.png - skin/classic/browser/identity.png skin/classic/browser/Info.png skin/classic/browser/page-livemarks.png skin/classic/browser/livemark-item.png diff --git a/browser/themes/winstripe/browser/browser.css b/browser/themes/winstripe/browser/browser.css index 6d1229926e5..c3e012d80f9 100644 --- a/browser/themes/winstripe/browser/browser.css +++ b/browser/themes/winstripe/browser/browser.css @@ -850,7 +850,7 @@ toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover:active { margin-bottom: 2px; margin-top: 2px; -moz-margin-end: 0px; - -moz-margin-start: 0px; + -moz-margin-start: 3px; width: 7em; min-width: 7em; @@ -1735,6 +1735,43 @@ toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text { color: #000000; } +#urlbar[level="high"] #lock-icon { + -moz-image-region: rect(0px, 18px, 18px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="high"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="high"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="low"] #lock-icon { + -moz-image-region: rect(0px, 18px, 18px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="low"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="low"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); + list-style-image: url("chrome://browser/skin/Secure.png"); +} +#urlbar[level="broken"] #lock-icon { + -moz-image-region: rect(0px, 18px, 18px, 0px); + list-style-image: url("chrome://browser/skin/Security-broken.png"); +} +#urlbar[level="broken"] #lock-icon:hover { + -moz-image-region: rect(18px, 18px, 36px, 0px); + list-style-image: url("chrome://browser/skin/Security-broken.png"); +} +#urlbar[level="broken"] #lock-icon:active { + -moz-image-region: rect(36px, 18px, 54px, 0px); + list-style-image: url("chrome://browser/skin/Security-broken.png"); +} + %ifdef MOZ_WIDGET_GTK2 #urlbar > .autocomplete-textbox-container { -moz-binding: url(chrome://browser/skin/browser.xml#autocomplete-security-wrapper); @@ -1847,105 +1884,3 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { .bookmark-item[dragover-bottom="true"] { -moz-border-bottom-colors: #000000; } - -/* ::::: Identity Indicator Styling ::::: */ -/* Location bar visuals*/ -#identity-box { - border-right: 1px solid #888; - background-color: white; - opacity: 0.9; -} - -#identity-box:hover { - opacity: 1.0; -} - -#identity-box.verifiedIdentity { - background-color: #BFA; -} - -#identity-icon-label { - padding: 1px 2px 2px; - margin: 0; - color: black; - vertical-align: middle; -} - -.unknownIdentity > #identity-icon-label { - display: none; -} - -/* Popup Icons */ -#identity-popup-icon { - height: 64px; - width: 64px; - padding: 0; - margin: 10px 0 0; - list-style-image: url("chrome://browser/skin/identity.png"); - -moz-image-region: rect(0px, 64px, 64px, 0px); -} - -.verifiedDomain > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(64px, 64px, 128px, 0px); -} - -.verifiedIdentity > #identity-popup-container > #identity-popup-icon { - -moz-image-region: rect(128px, 64px, 192px, 0px); -} - -/* Popup Title */ -#identity-popup-title { - font-size: 120%; - font-weight: bold; -} - -.verifiedIdentity > #identity-popup-title { - color: #6A6; -} - -.unknownIdentity > #identity-popup-title { - color: #999; -} - -.verifiedDomain > #identity-popup-title { - color: black; -} - -/* Popup Body Text */ -#identity-popup-content-box > description, -#identity-popup-encryption-label { - white-space: -moz-pre-wrap; - color: black; - padding-left: 10px; -} - -#identity-popup-content { - padding-top: 5px; - margin-bottom: 0; - max-width: 200px; -} - -.verifiedIdentity > #identity-popup-content, -.verifiedDomain > #identity-popup-content { - font-size: 140%; - font-weight: bold; - max-width: 300px; -} - -#identity-popup-encryption { - margin: 10px 0; -} - -.verifiedIdentity > #identity-popup-encryption > * > #identity-popup-encryption-icon, -.verifiedDomain > #identity-popup-encryption > * >#identity-popup-encryption-icon { - list-style-image: url("chrome://browser/skin/Secure.png"); - -moz-image-region: rect(0px, 18px, 18px, 0px); -} - -/* Popup Bounding Box */ -#identity-popup-container { - background-image: none; - background-color: white; - min-width: 280px; - padding: 10px; -} diff --git a/browser/themes/winstripe/browser/jar.mn b/browser/themes/winstripe/browser/jar.mn index e2d1c560dd1..cf9c1bf3afe 100644 --- a/browser/themes/winstripe/browser/jar.mn +++ b/browser/themes/winstripe/browser/jar.mn @@ -6,7 +6,6 @@ classic.jar: skin/classic/browser/endcap-bkgnd-hover.png * skin/classic/browser/engineManager.css (engineManager.css) skin/classic/browser/Info.png - skin/classic/browser/identity.png skin/classic/browser/pageInfo.css skin/classic/browser/pageInfo.png skin/classic/browser/page-livemarks.png