Backed out changeset 53a5746425f9 (bug 834830)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 08 Jul 2015 15:28:35 +0200
changeset 251875 741bb6d3448bdf093be282481a8d3a223076bdd7
parent 251874 64d240b53e52a6939a8521537dee7ab01fd2f855
child 251876 35010b71836c9d8d3631644ddd6ea73ea5e7137e
push id29015
push userryanvm@gmail.com
push dateWed, 08 Jul 2015 18:21:41 +0000
treeherdermozilla-central@2469f45c4770 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs834830
milestone42.0a1
backs out53a5746425f9574399d357aa9701d9fc13de4cc5
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
Backed out changeset 53a5746425f9 (bug 834830)
browser/base/content/browser.js
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4372,20 +4372,16 @@ var XULBrowserWindow = {
       // anymore, but still set it for third-party themes.
       if (gURLBar)
         gURLBar.setAttribute("level", level);
     } else {
       if (gURLBar)
         gURLBar.removeAttribute("level");
     }
 
-    // Make sure the "https" part of the URL is striked out or not,
-    // depending on the current mixed active content blocking state.
-    gURLBar.formatValue();
-
     try {
       uri = Services.uriFixup.createExposableURI(uri);
     } catch (e) {}
     gIdentityHandler.checkIdentity(this._state, uri);
     TrackingProtection.onSecurityChange(this._state);
   },
 
   // simulate all change notifications after switching tabs
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -208,52 +208,34 @@ file, You can obtain one at http://mozil
           // nsIURIFixup::createFixupURI with the result will produce a different URI.
           return this._mayTrimURLs ? trimURL(aURL) : aURL;
         ]]></body>
       </method>
 
       <field name="_formattingEnabled">true</field>
       <method name="formatValue">
         <body><![CDATA[
-          if (!this._formattingEnabled)
+          if (!this._formattingEnabled || this.focused)
             return;
 
-          // Always clear the strike-out selection first.
           let controller = this.editor.selectionController;
-          let strikeOut = controller.getSelection(controller.SELECTION_URLSTRIKEOUT);
-          strikeOut.removeAllRanges();
-
-          if (this.focused)
-            return;
-
           let selection = controller.getSelection(controller.SELECTION_URLSECONDARY);
           selection.removeAllRanges();
 
           let textNode = this.editor.rootElement.firstChild;
           let value = textNode.textContent;
 
           let protocol = value.match(/^[a-z\d.+\-]+:(?=[^\d])/);
           if (protocol &&
               ["http:", "https:", "ftp:"].indexOf(protocol[0]) == -1)
             return;
           let matchedURL = value.match(/^((?:[a-z]+:\/\/)?(?:[^\/]+@)?)(.+?)(?::\d+)?(?:\/|$)/);
           if (!matchedURL)
             return;
 
-          // Strike out the "https" part if mixed active content is loaded.
-          if (this.getAttribute("pageproxystate") == "valid" &&
-              value.startsWith("https:") &&
-              gBrowser.securityUI.state &
-                Ci.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT) {
-            let range = document.createRange();
-            range.setStart(textNode, 0);
-            range.setEnd(textNode, 5);
-            strikeOut.addRange(range);
-          }
-
           let [, preDomain, domain] = matchedURL;
           let baseDomain = domain;
           let subDomain = "";
           // getBaseDomainFromHost doesn't recognize IPv6 literals in brackets as IPs (bug 667159)
           if (domain[0] != "[") {
             try {
               baseDomain = Services.eTLD.getBaseDomainFromHost(domain);
               if (!domain.endsWith(baseDomain)) {
@@ -946,27 +928,19 @@ file, You can obtain one at http://mozil
              event.keyCode === KeyEvent.DOM_VK_SHIFT) &&
             this._noActionsKeys.has(event.keyCode)) {
           this._noActionsKeys.delete(event.keyCode);
           if (this._noActionsKeys.size == 0)
             this._clearNoActions();
         }
       ]]></handler>
 
-      <handler event="focus"><![CDATA[
-        if (event.originalTarget == this.inputField) {
-          this.formatValue();
-        }
-      ]]></handler>
-
       <handler event="blur"><![CDATA[
-        if (event.originalTarget == this.inputField) {
-          this._clearNoActions();
-          this.formatValue();
-        }
+        this._clearNoActions();
+        this.formatValue();
       ]]></handler>
 
       <handler event="dragstart" phase="capturing"><![CDATA[
         // Drag only if the gesture starts from the input field.
         if (this.inputField != event.originalTarget &&
             !(this.inputField.compareDocumentPosition(event.originalTarget) &
               Node.DOCUMENT_POSITION_CONTAINED_BY))
           return;