Browse Source

[Pale-Moon] Issue #1717 - Add distinct mixed-mode indicator and logic for display.

pull/24/head
Moonchild 2 years ago committed by roytam1
parent
commit
08809c7f12
  1. 1
      application/palemoon/base/content/browser.js
  2. 48
      application/palemoon/base/content/padlock.css
  3. 16
      application/palemoon/base/content/padlock.js
  4. BIN
      application/palemoon/base/content/padlock_classic_mixed.png
  5. BIN
      application/palemoon/base/content/padlock_mod_mixed.png
  6. 2
      application/palemoon/base/jar.mn
  7. 1
      application/palemoon/locales/en-US/chrome/browser/browser.properties
  8. 9
      application/palemoon/themes/linux/browser.css
  9. 11
      application/palemoon/themes/osx/browser.css
  10. 18
      application/palemoon/themes/windows/browser.css

1
application/palemoon/base/content/browser.js

@ -6832,6 +6832,7 @@ var gIdentityHandler = {
let punyID = gPrefService.getIntPref("browser.identity.display_punycode", 1);
switch (newMode) {
case this.IDENTITY_MODE_MIXED_CONTENT:
case this.IDENTITY_MODE_DOMAIN_VERIFIED: {
let iData = this.getIdentityData();

48
application/palemoon/base/content/padlock.css

@ -20,12 +20,16 @@
background-color: transparent;
}
#padlock-ib[padshow="ib-trans-bg"][level="low"],
#padlock-ib[padshow="ib-trans-bg"][level="mixed"] {
#padlock-ib[padshow="ib-trans-bg"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_mod_low.png");
background-color: transparent;
}
#padlock-ib[padshow="ib-trans-bg"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_mod_mixed.png");
background-color: transparent;
}
#padlock-ib[padshow="ib-trans-bg"][level="broken"] {
list-style-image: url("chrome://browser/content/padlock_mod_broken.png");
background-color: transparent;
@ -55,13 +59,18 @@
background-color: transparent;
}
#padlock-ib-left[padshow="ib-left"][level="low"],
#padlock-ib-left[padshow="ib-left"][level="mixed"] {
#padlock-ib-left[padshow="ib-left"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_mod_low.png");
padding: 2px;
background-color: transparent;
}
#padlock-ib-left[padshow="ib-left"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_mod_mixed.png");
padding: 2px;
background-color: transparent;
}
#padlock-ib-left[padshow="ib-left"][level="broken"] {
list-style-image: url("chrome://browser/content/padlock_mod_broken.png");
padding: 2px;
@ -90,12 +99,16 @@
background-color: transparent;
}
#padlock-ub-right[padshow="ub-right"][level="low"],
#padlock-ub-right[padshow="ub-right"][level="mixed"] {
#padlock-ub-right[padshow="ub-right"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_mod_low.png");
background-color: transparent;
}
#padlock-ub-right[padshow="ub-right"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_mod_mixed.png");
background-color: transparent;
}
#padlock-ub-right[padshow="ub-right"][level="broken"] {
list-style-image: url("chrome://browser/content/padlock_mod_broken.png");
background-color: transparent;
@ -117,12 +130,16 @@
background-color: transparent;
}
#padlock-sb[padshow="statbar"][level="low"],
#padlock-sb[padshow="statbar"][level="mixed"] {
#padlock-sb[padshow="statbar"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_mod_low.png");
background-color: transparent;
}
#padlock-sb[padshow="statbar"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_mod_mixed.png");
background-color: transparent;
}
#padlock-sb[padshow="statbar"][level="broken"] {
list-style-image: url("chrome://browser/content/padlock_mod_broken.png");
background-color: transparent;
@ -144,12 +161,16 @@
background-color: transparent;
}
#padlock-tab[padshow="tabs-bar"][level="low"],
#padlock-tab[padshow="tabs-bar"][level="mixed"] {
#padlock-tab[padshow="tabs-bar"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_mod_low.png");
background-color: transparent;
}
#padlock-tab[padshow="tabs-bar"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_mod_mixed.png");
background-color: transparent;
}
#padlock-tab[padshow="tabs-bar"][level="broken"] {
list-style-image: url("chrome://browser/content/padlock_mod_broken.png");
background-color: transparent;
@ -176,13 +197,16 @@
#padlock-ib-left[padshow="ib-left"][padstyle="classic"][level="low"],
#padlock-ub-right[padshow="ub-right"][padstyle="classic"][level="low"],
#padlock-sb[padshow="statbar"][padstyle="classic"][level="low"],
#padlock-tab[padshow="tabs-bar"][padstyle="classic"][level="low"],
#padlock-tab[padshow="tabs-bar"][padstyle="classic"][level="low"] {
list-style-image: url("chrome://browser/content/padlock_classic_low.png");
}
#padlock-ib[padshow="ib-trans-bg"][padstyle="classic"][level="mixed"],
#padlock-ib-left[padshow="ib-left"][padstyle="classic"][level="mixed"],
#padlock-ub-right[padshow="ub-right"][padstyle="classic"][level="mixed"],
#padlock-sb[padshow="statbar"][padstyle="classic"][level="mixed"],
#padlock-tab[padshow="tabs-bar"][padstyle="classic"][level="mixed"] {
list-style-image: url("chrome://browser/content/padlock_classic_low.png");
list-style-image: url("chrome://browser/content/padlock_classic_mixed.png");
}
#padlock-ib[padshow="ib-trans-bg"][padstyle="classic"][level="broken"],

16
application/palemoon/base/content/padlock.js

@ -38,10 +38,13 @@ var padlock_PadLock =
level = "ev";
} else {
// Step 1 FALSE: Domain Validation
// Normal "high"
// Mixed Active Content "low"
// Normal "high"
// Mixed Passive Content "mixed"
// Mixed Active Content "broken"
if (aState & wpl.STATE_LOADED_MIXED_ACTIVE_CONTENT)
level = "low";
level = "broken";
else if (aState & wpl.STATE_LOADED_MIXED_DISPLAY_CONTENT)
level = "mixed";
else
level = "high";
}
@ -125,6 +128,7 @@ var padlock_PadLock =
let s_ev = "Extended Validated";
let s_hi = "Secure";
let s_mx = "Mixed content";
let s_lo = "Weak security";
let s_no = "Not secure";
let gLocale = document.getElementById("bundle_browser");
@ -135,6 +139,9 @@ var padlock_PadLock =
let n_hi = gLocale.getString("identity.padlock.high");
if(n_hi != null)
s_hi = n_hi;
let n_mx = gLocale.getString("identity.padlock.mixed");
if(n_mx != null)
s_mx = n_mx;
let n_lo = gLocale.getString("identity.padlock.low");
if(n_lo != null)
s_lo = n_lo;
@ -152,6 +159,9 @@ var padlock_PadLock =
case "low":
sectooltip = s_lo;
break;
case "mixed":
sectooltip = s_mx;
break;
case "broken":
sectooltip = s_no;
break;

BIN
application/palemoon/base/content/padlock_classic_mixed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
application/palemoon/base/content/padlock_mod_mixed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

2
application/palemoon/base/jar.mn

@ -37,10 +37,12 @@ browser.jar:
content/browser/padlock_mod_ev.png (content/padlock_mod_ev.png)
content/browser/padlock_mod_https.png (content/padlock_mod_https.png)
content/browser/padlock_mod_low.png (content/padlock_mod_low.png)
content/browser/padlock_mod_mixed.png (content/padlock_mod_mixed.png)
content/browser/padlock_mod_broken.png (content/padlock_mod_broken.png)
content/browser/padlock_classic_ev.png (content/padlock_classic_ev.png)
content/browser/padlock_classic_https.png (content/padlock_classic_https.png)
content/browser/padlock_classic_low.png (content/padlock_classic_low.png)
content/browser/padlock_classic_mixed.png (content/padlock_classic_mixed.png)
content/browser/padlock_classic_broken.png (content/padlock_classic_broken.png)
content/browser/palemoon.xhtml (content/palemoon.xhtml)
content/browser/openLocation.js (content/openLocation.js)

1
application/palemoon/locales/en-US/chrome/browser/browser.properties

@ -282,6 +282,7 @@ identity.unknown.tooltip=This website does not supply identity information.
identity.padlock.ev=Extended Validated
identity.padlock.high=Secure
identity.padlock.mixed=Mixed content
identity.padlock.low=Weak security
identity.padlock.broken=Not secure

9
application/palemoon/themes/linux/browser.css

@ -1055,6 +1055,15 @@ toolbar[iconsize="small"] #webrtc-status-button {
background-repeat: no-repeat;
}
#urlbar[pageproxystate="valid"] > #identity-box.mixedContent {
color: rgb(79,79,0);
margin-inline-end: 4px;
background-image: linear-gradient(rgba(245,245,220,1),
rgba(242,242,207,1));
background-position: right;
background-repeat: no-repeat;
}
#identity-box.verifiedIdentity:-moz-locale-dir(rtl) {
background-position: left;
}

11
application/palemoon/themes/osx/browser.css

@ -1073,6 +1073,17 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder,
background-repeat: no-repeat;
}
#urlbar[pageproxystate="valid"] > #identity-box.mixedContent {
color: rgb(79,79,0);
margin-inline-end: 4px;
background-image: -moz-linear-gradient(rgba(79,79,0,0),
rgba(79,79,0,.08) 25%,
rgba(79,79,0,.08) 75%,
rgba(79,79,0,0));
background-position: right;
background-repeat: no-repeat;
}
#identity-box.verifiedIdentity:-moz-locale-dir(rtl) {
background-position: left;
}

18
application/palemoon/themes/windows/browser.css

@ -1486,6 +1486,18 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder,
border-right: 1px solid rgba(0,79,168,0.5);
}
#urlbar[pageproxystate="valid"] > #identity-box.mixedContent {
color: rgb(79,79,0);
margin-inline-end: 4px;
background-image: -moz-linear-gradient(rgba(79,79,0,0),
rgba(79,79,0,.08) 25%,
rgba(79,79,0,.08) 75%,
rgba(79,79,0,0));
background-position: right;
background-repeat: no-repeat;
border-right: 1px solid rgba(79,79,0,0.5);
}
#identity-box.verifiedIdentity:-moz-locale-dir(rtl) {
background-position: left;
border-right: none;
@ -1498,6 +1510,12 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder,
border-left: 1px solid rgba(0,79,168,0.5);
}
#identity-box.mixedContent:-moz-locale-dir(rtl) {
background-position: left;
border-right: none;
border-left: 1px solid rgba(79,79,0,0.5);
}
#identity-box:-moz-focusring {
outline: 1px dotted #000;
outline-offset: -3px;

Loading…
Cancel
Save