Bug 1074520 - set node width in addition to height to avoid empty lines due to different wrapping, r=jaws

This commit is contained in:
Gijs Kruitbosch 2014-10-20 16:27:53 +01:00
parent 0c0f79c4c4
commit fca64d6688

View File

@ -1048,8 +1048,11 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
let win = aContainer.ownerDocument.defaultView;
for (let item of variableHeightItems) {
if (aSetHeights) {
let height = win.getComputedStyle(item, null).getPropertyValue("height");
let cs = win.getComputedStyle(item, null);
let height = cs.getPropertyValue("height");
let width = cs.getPropertyValue("width");
item.style.height = height;
item.style.width = width;
// In the main menu panel, need to set the height of the container of this
// description because otherwise the text will overflow:
if (item.id == "PanelUI-panic-mainDesc" &&
@ -1060,6 +1063,7 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
}
} else {
item.style.removeProperty("height");
item.style.removeProperty("width");
if (item.id == "PanelUI-panic-mainDesc") {
item.parentNode.style.removeProperty("min-height");
}