Bug 1437324 - Wrap popup permission indicator text in the Site Identity Panel when it exceeds the width of the panel. r=johannh
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Sat, 03 Mar 2018 19:19:42 +0530
changeset 461928 232a67888d2f9869176434e8595266ce3e090ce9
parent 461927 c3f5ebf5eda63aadc5a13d5c89c1056448a11e72
child 461929 7e7fda92a9938609639e67559227247131f726af
child 461945 493e45400842b6ccfffb63b58b40b33a0b8154ab
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1437324
milestone60.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
Bug 1437324 - Wrap popup permission indicator text in the Site Identity Panel when it exceeds the width of the panel. r=johannh textContent is used to set the indicator label text here instead of the value attribute because the text set using the value attribute does not wrap when it exceeds the width of the panel, which in turn pushes the menulist and half of the indicator text out of view. MozReview-Commit-ID: 1VBaQlbZwzQ
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -8272,17 +8272,17 @@ var gIdentityHandler = {
     let text = document.createElement("label");
     text.setAttribute("flex", "1");
     text.setAttribute("class", "identity-popup-permission-label text-link");
 
     let popupCount = gBrowser.selectedBrowser.blockedPopups.length;
     let messageBase = gNavigatorBundle.getString("popupShowBlockedPopupsIndicatorText");
     let message = PluralForm.get(popupCount, messageBase)
                                  .replace("#1", popupCount);
-    text.setAttribute("value", message);
+    text.textContent = message;
 
     text.addEventListener("click", () => {
       gPopupBlockerObserver.showAllBlockedPopups(gBrowser.selectedBrowser);
     });
 
     indicator.appendChild(icon);
     indicator.appendChild(text);