Bug 1400544 - Include full host name in site identity popup. r?liuche draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Sat, 16 Sep 2017 14:28:17 +0200
changeset 666383 a41a9f156b6cc36f4e513bfdd2639ac8c7e4d431
parent 666382 ecd773d70d8baf3aa8945ff3657dc7edd97dff2e
child 666384 5c9e893996330ed0edf63a2fc405e08dbb729459
push id80389
push usermozilla@buttercookie.de
push dateMon, 18 Sep 2017 17:36:46 +0000
reviewersliuche
bugs1400544
milestone57.0a1
Bug 1400544 - Include full host name in site identity popup. r?liuche MozReview-Commit-ID: FFojx008ZWK
mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/SiteIdentityPopup.java
@@ -490,17 +490,17 @@ public class SiteIdentityPopup extends A
         addSelectLoginDoorhanger(selectedTab);
 
         if (mSiteIdentity.getSecurityMode() == SecurityMode.CHROMEUI) {
             // For about: pages we display the product icon in place of the verified/globe
             // image, hence we don't also set the favicon (for most about pages the
             // favicon is the product icon, hence we'd be showing the same icon twice).
             mTitle.setText(R.string.moz_app_displayname);
         } else {
-            mTitle.setText(selectedTab.getBaseDomain());
+            mTitle.setText(mSiteIdentity.getHost());
 
             final Bitmap favicon = selectedTab.getFavicon();
             if (favicon != null) {
                 final Drawable faviconDrawable = new BitmapDrawable(mResources, favicon);
                 final int dimen = (int) mResources.getDimension(R.dimen.browser_toolbar_favicon_size);
                 faviconDrawable.setBounds(0, 0, dimen, dimen);
 
                 TextViewCompat.setCompoundDrawablesRelative(mTitle, faviconDrawable, null, null, null);
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5608,32 +5608,32 @@ var IdentityHandler = {
       mode: {
         identity: identityMode,
         mixed_display: mixedDisplay,
         mixed_active: mixedActive,
         tracking: trackingMode
       }
     };
 
+    result.host = this.getEffectiveHost();
+
     // Don't show identity data for pages with an unknown identity or if any
     // mixed content is loaded (mixed display content is loaded by default).
     // We also return for CHROMEUI pages since they don't have any certificate
     // information to load either. result.secure specifically refers to connection
     // security, which is irrelevant for about: pages, as they're loaded locally.
     if (identityMode == this.IDENTITY_MODE_UNKNOWN ||
         identityMode == this.IDENTITY_MODE_CHROMEUI ||
         aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
       result.secure = false;
       return result;
     }
 
     result.secure = true;
 
-    result.host = this.getEffectiveHost();
-
     let iData = this.getIdentityData();
     result.verifier = Strings.browser.formatStringFromName("identity.identified.verifier", [iData.caOrg], 1);
 
     // If the cert is identified, then we can populate the results with credentials
     if (aState & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
       result.owner = iData.subjectOrg;
 
       // Build an appropriate supplemental block out of whatever location data we have