Backed out 1 changesets (bug 1193004) for bc7 test failures
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 14 Sep 2015 15:18:25 +0200
changeset 294874 9e23f327657187fc2a38bd4220c75503e7a8a96d
parent 294873 2aa3e68dec24086d678c2e544685f4b73bec6afd
child 294875 f0544edc121ea85cd58d813470c320286e1ed4ce
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1193004
milestone43.0a1
backs out98f6e793e3832f3ff7d312a9d9d1b5c5b97de669
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 1 changesets (bug 1193004) for bc7 test failures Backed out changeset 98f6e793e383 (bug 1193004)
browser/base/content/browser.js
browser/base/content/test/general/browser_permissions.js
browser/components/controlcenter/content/panel.inc.xul
browser/locales/en-US/chrome/browser/browser.dtd
browser/themes/shared/controlcenter/panel.inc.css
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6802,37 +6802,43 @@ var gIdentityHandler = {
   get _identityIcons () {
     delete this._identityIcons;
     return this._identityIcons = document.getElementById("identity-icons");
   },
   get _identityIcon () {
     delete this._identityIcon;
     return this._identityIcon = document.getElementById("page-proxy-favicon");
   },
+  get _permissionsContainer () {
+    delete this._permissionsContainer;
+    return this._permissionsContainer = document.getElementById("identity-popup-permissions");
+  },
   get _permissionList () {
     delete this._permissionList;
     return this._permissionList = document.getElementById("identity-popup-permission-list");
   },
 
   /**
    * Rebuild cache of the elements that may or may not exist depending
    * on whether there's a location bar.
    */
   _cacheElements : function() {
     delete this._identityBox;
     delete this._identityIcons;
     delete this._identityIconLabel;
     delete this._identityIconCountryLabel;
     delete this._identityIcon;
+    delete this._permissionsContainer;
     delete this._permissionList;
     this._identityBox = document.getElementById("identity-box");
     this._identityIcons = document.getElementById("identity-icons");
     this._identityIconLabel = document.getElementById("identity-icon-label");
     this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
     this._identityIcon = document.getElementById("page-proxy-favicon");
+    this._permissionsContainer = document.getElementById("identity-popup-permissions");
     this._permissionList = document.getElementById("identity-popup-permission-list");
   },
 
   /**
    * Handler for mouseclicks on the "More Information" button in the
    * "identity-popup" panel.
    */
   handleMoreInfoClick : function(event) {
@@ -7314,16 +7320,18 @@ var gIdentityHandler = {
       let state = SitePermissions.get(uri, permission);
 
       if (state == SitePermissions.UNKNOWN)
         continue;
 
       let item = this._createPermissionItem(permission, state);
       this._permissionList.appendChild(item);
     }
+
+    this._permissionsContainer.hidden = !this._permissionList.hasChildNodes();
   },
 
   setPermission: function (aPermission, aState) {
     if (aState == SitePermissions.getDefault(aPermission))
       SitePermissions.remove(gBrowser.currentURI, aPermission);
     else
       SitePermissions.set(gBrowser.currentURI, aPermission, aState);
   },
--- a/browser/base/content/test/general/browser_permissions.js
+++ b/browser/base/content/test/general/browser_permissions.js
@@ -13,34 +13,28 @@ registerCleanupFunction(function() {
   }
 });
 
 add_task(function* testMainViewVisible() {
   let {gIdentityHandler} = gBrowser.ownerGlobal;
   let tab = gBrowser.selectedTab = gBrowser.addTab();
   yield promiseTabLoadEvent(tab, PERMISSIONS_PAGE);
 
-  // Retrieve the label that's shown when the user didn't grant the page any
-  // special permissions.
-  let emptyLabel = document.querySelector("#identity-popup-permission-list + description");
-
   gIdentityHandler._identityBox.click();
-  ok(!is_hidden(emptyLabel), "List of permissions is empty");
+  ok(is_hidden(gIdentityHandler._permissionsContainer), "The container is hidden");
   gIdentityHandler._identityPopup.hidden = true;
 
   gIdentityHandler.setPermission("install", 1);
 
   gIdentityHandler._identityBox.click();
-  ok(is_hidden(emptyLabel), "List of permissions is not empty");
-
-  let permissionsList = document.getElementById("identity-popup-permission-list");
-  let menulists = permissionsList.querySelectorAll("menulist");
+  ok(!is_hidden(gIdentityHandler._permissionsContainer), "The container is visible");
+  let menulists = gIdentityHandler._permissionsContainer.querySelectorAll("menulist");
   is(menulists.length, 1, "One permission visible in main view");
   is(menulists[0].id, "identity-popup-permission:install", "Install permission visible");
   is(menulists[0].value, "1", "Correct value on install menulist");
   gIdentityHandler._identityPopup.hidden = true;
 
   gIdentityHandler.setPermission("install", SitePermissions.getDefault("install"));
 
   gIdentityHandler._identityBox.click();
-  ok(!is_hidden(emptyLabel), "List of permissions is empty");
+  ok(is_hidden(gIdentityHandler._permissionsContainer), "The container is hidden");
   gIdentityHandler._identityPopup.hidden = true;
 });
--- a/browser/components/controlcenter/content/panel.inc.xul
+++ b/browser/components/controlcenter/content/panel.inc.xul
@@ -76,22 +76,21 @@
           <button id="tracking-action-block"
                   label="&trackingProtection.block2.label;"
                   accesskey="&trackingProtection.block2.accesskey;"
                   oncommand="TrackingProtection.enableForCurrentPage();" />
         </vbox>
       </hbox>
 
       <!-- Permissions Section -->
-      <hbox class="identity-popup-section">
+      <hbox id="identity-popup-permissions" class="identity-popup-section">
         <vbox id="identity-popup-permissions-content" flex="1">
           <label class="identity-popup-headline"
                  value="&identity.permissions;"/>
           <vbox id="identity-popup-permission-list"/>
-          <description>&identity.permissionsEmpty;</description>
         </vbox>
       </hbox>
     </panelview>
 
     <!-- Security SubView -->
     <panelview id="identity-popup-securityView" flex="1">
       <vbox id="identity-popup-securityView-header">
         <label observes="identity-popup-content-host"/>
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -728,17 +728,16 @@ you can use these alternative items. Oth
 <!ENTITY identity.enableMixedContentBlocking.accesskey "E">
 <!ENTITY identity.disableMixedContentBlocking.label "Disable protection for now">
 <!ENTITY identity.disableMixedContentBlocking.accesskey "D">
 <!ENTITY identity.learnMore "Learn More">
 
 <!ENTITY identity.moreInfoLinkText2 "More Information">
 
 <!ENTITY identity.permissions "Permissions">
-<!ENTITY identity.permissionsEmpty "You have not granted this site any special permissions.">
 
 <!-- Name for the tabs toolbar as spoken by screen readers.
      The word "toolbar" is appended automatically and should not be contained below! -->
 <!ENTITY tabsToolbar.label "Browser tabs">
 
 <!-- LOCALIZATION NOTE (syncTabsMenu2.label): This appears in the history menu -->
 <!ENTITY syncTabsMenu2.label     "Tabs From Other Devices">
 
--- a/browser/themes/shared/controlcenter/panel.inc.css
+++ b/browser/themes/shared/controlcenter/panel.inc.css
@@ -154,17 +154,16 @@
 }
 
 /* CONTENT */
 
 #identity-popup-security-content > description,
 #identity-popup-security-descriptions > description,
 #identity-popup-securityView-header > description,
 #identity-popup-securityView-body > description,
-#identity-popup-permissions-content > description,
 #tracking-protection-content > label {
   white-space: pre-wrap;
   font-size: 110%;
   margin: 0;
 }
 
 .identity-popup-headline {
   margin: 3px 0 4px;
@@ -284,20 +283,16 @@ description#identity-popup-content-verif
 }
 
 /* PERMISSIONS */
 
 #identity-popup-permissions-content {
   background-image: url(chrome://browser/skin/controlcenter/permissions.svg);
 }
 
-#identity-popup-permission-list:not(:empty) {
+#identity-popup-permission-list {
   margin-top: 5px;
 }
 
-#identity-popup-permission-list:not(:empty) + description {
-  display: none;
-}
-
 .identity-popup-permission-label {
   -moz-margin-start: 0;
 }