Backout bug 1185173 for accidental landing. r=bustage DONTBUILD
authorChenxia Liu <liuche@mozilla.com>
Mon, 03 Aug 2015 18:34:58 -0700
changeset 287598 5721360e23cd7bb9d4c23175273a411d6fd72f49
parent 287597 4fe45a08aebac4c154877ccb64b161cca31ac192
child 287599 8901e4fc709c1574b1441471989f5d3fc8152d7c
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1185173
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout bug 1185173 for accidental landing. r=bustage DONTBUILD
mobile/android/base/SiteIdentity.java
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/SiteIdentity.java
+++ b/mobile/android/base/SiteIdentity.java
@@ -145,17 +145,16 @@ public class SiteIdentity {
         if (identityData == null) {
             reset();
             return;
         }
 
         try {
             JSONObject mode = identityData.getJSONObject("mode");
 
-            // TODO: Switch to "display" and "active"
             try {
                 mMixedMode = MixedMode.fromString(mode.getString("mixed"));
             } catch (Exception e) {
                 mMixedMode = MixedMode.UNKNOWN;
             }
 
             try {
                 mTrackingMode = TrackingMode.fromString(mode.getString("tracking"));
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -7082,21 +7082,21 @@ var IdentityHandler = {
   IDENTITY_MODE_IDENTIFIED: "identified",
 
   // The following mixed content modes are only used if "security.mixed_content.block_active_content"
   // is enabled. Our Java frontend coalesces them into one indicator.
 
   // No mixed content information. No mixed content icon is shown.
   MIXED_MODE_UNKNOWN: "unknown",
 
-  // Blocked active mixed content.
-  MIXED_MODE_CONTENT_BLOCKED: "blocked",
-
-  // Loaded active mixed content.
-  MIXED_MODE_CONTENT_LOADED: "loaded",
+  // Blocked active mixed content. Shield icon is shown, with a popup option to load content.
+  MIXED_MODE_CONTENT_BLOCKED: "mixed_content_blocked",
+
+  // Loaded active mixed content. Yellow triangle icon is shown.
+  MIXED_MODE_CONTENT_LOADED: "mixed_content_loaded",
 
   // The following tracking content modes are only used if tracking protection
   // is enabled. Our Java frontend coalesces them into one indicator.
 
   // No tracking content information. No tracking content icon is shown.
   TRACKING_MODE_UNKNOWN: "unknown",
 
   // Blocked active tracking content. Shield icon is shown, with a popup option to load content.
@@ -7152,39 +7152,27 @@ var IdentityHandler = {
 
     if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) {
       return this.IDENTITY_MODE_DOMAIN_VERIFIED;
     }
 
     return this.IDENTITY_MODE_UNKNOWN;
   },
 
-  getMixedDisplayMode: function getMixedDisplayMode(aState) {
-    if ((aState & Ci.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT)) {
-        return this.MIXED_MODE_CONTENT_LOADED;
-    }
-
-    if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT) {
-        return this.MIXED_MODE_CONTENT_BLOCKED;
-    }
-
-    return this.MIXED_MODE_UNKNOWN;
-  },
-
-  getMixedActiveMode: function getActiveDisplayMode(aState) {
+  getMixedMode: function getMixedMode(aState) {
+    if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT) {
+      return this.MIXED_MODE_CONTENT_BLOCKED;
+    }
+
     // Only show an indicator for loaded mixed content if the pref to block it is enabled
     if ((aState & Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) &&
          !Services.prefs.getBoolPref("security.mixed_content.block_active_content")) {
       return this.MIXED_MODE_CONTENT_LOADED;
     }
 
-    if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_MIXED_ACTIVE_CONTENT) {
-      return this.MIXED_MODE_CONTENT_BLOCKED;
-    }
-
     return this.MIXED_MODE_UNKNOWN;
   },
 
   getTrackingMode: function getTrackingMode(aState, aBrowser) {
     if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT) {
       Telemetry.addData("TRACKING_PROTECTION_SHIELD", 2);
       return this.TRACKING_MODE_CONTENT_BLOCKED;
     }
@@ -7225,27 +7213,23 @@ var IdentityHandler = {
     } catch (ex) {
       // Can sometimes throw if the URL being visited has no host/hostname,
       // e.g. about:blank. The _state for these pages means we won't need these
       // properties anyways, though.
     }
     this._lastLocation = locationObj;
 
     let identityMode = this.getIdentityMode(aState);
-    let mixedDisplay = this.getMixedDisplayMode(aState);
-    let mixedActive = this.getMixedActiveMode(aState);
-//    let mixedMode = this.getMixedMode(aState);
+    let mixedMode = this.getMixedMode(aState);
     let trackingMode = this.getTrackingMode(aState, aBrowser);
     let result = {
       origin: locationObj.origin,
       mode: {
         identity: identityMode,
-        mixed_display: mixedDisplay,
-        mixed_active: mixedActive,
-//        mixed: mixedMode,
+        mixed: mixedMode,
         tracking: trackingMode
       }
     };
 
     // 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).
     if (identityMode == this.IDENTITY_MODE_UNKNOWN || aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) {
       return result;