Bug 1451282 - Don't use a groupbox for the meta tree in the Page Info window. r=bgrins
This also aligns the help button to the bottom of the window even when the meta tree is hidden.
MozReview-Commit-ID: GCmgThN569z
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -466,31 +466,16 @@ function loadTab(args) {
var initialTab = (args && args.initialTab) || "generalTab";
var radioGroup = document.getElementById("viewGroup");
initialTab = document.getElementById(initialTab) || document.getElementById("generalTab");
radioGroup.selectedItem = initialTab;
radioGroup.selectedItem.doCommand();
radioGroup.focus();
}
-function toggleGroupbox(id) {
- var elt = document.getElementById(id);
- if (elt.hasAttribute("closed")) {
- elt.removeAttribute("closed");
- if (elt.flexWhenOpened)
- elt.flex = elt.flexWhenOpened;
- } else {
- elt.setAttribute("closed", "true");
- if (elt.flex) {
- elt.flexWhenOpened = elt.flex;
- elt.flex = 0;
- }
- }
-}
-
function openCacheEntry(key, cb) {
var checkCacheListener = {
onCacheEntryCheck(entry, appCache) {
return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
},
onCacheEntryAvailable(entry, isNew, appCache, status) {
cb(entry);
}
@@ -518,30 +503,30 @@ function makeGeneralTab(metaViewRows, do
// get the document characterset
var encoding = docInfo.characterSet;
document.getElementById("encodingtext").value = encoding;
let length = metaViewRows.length;
var metaGroup = document.getElementById("metaTags");
if (!length)
- metaGroup.collapsed = true;
+ metaGroup.style.visibility = "hidden";
else {
var metaTagsCaption = document.getElementById("metaTagsCaption");
if (length == 1)
- metaTagsCaption.label = gBundle.getString("generalMetaTag");
+ metaTagsCaption.value = gBundle.getString("generalMetaTag");
else
- metaTagsCaption.label = gBundle.getFormattedString("generalMetaTags", [length]);
+ metaTagsCaption.value = gBundle.getFormattedString("generalMetaTags", [length]);
var metaTree = document.getElementById("metatree");
metaTree.view = gMetaView;
// Add the metaViewRows onto the general tab's meta info tree.
gMetaView.addRows(metaViewRows);
- metaGroup.collapsed = false;
+ metaGroup.style.removeProperty("visibility");
}
// get the date of last modification
var modifiedText = formatDate(docInfo.lastModified, gStrings.notSet);
document.getElementById("modifiedtext").value = modifiedText;
// get cache info
var cacheKey = url.replace(/#.*$/, "");
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -137,31 +137,31 @@
<row id="generalModifiedRow">
<label control="modifiedtext" value="&generalModified;"/>
<separator/>
<textbox readonly="true" id="modifiedtext"/>
</row>
</rows>
</grid>
<separator class="thin"/>
- <groupbox id="metaTags" flex="1" class="collapsable treebox">
- <caption id="metaTagsCaption" onclick="toggleGroupbox('metaTags');"/>
+ <vbox id="metaTags" flex="1">
+ <label control="metatree" id="metaTagsCaption" class="header"/>
<tree id="metatree" flex="1" hidecolumnpicker="true" contextmenu="picontext">
<treecols>
<treecol id="meta-name" label="&generalMetaName;"
persist="width" flex="1"
onclick="gMetaView.onPageMediaSort('meta-name');"/>
<splitter class="tree-splitter"/>
<treecol id="meta-content" label="&generalMetaContent;"
persist="width" flex="4"
onclick="gMetaView.onPageMediaSort('meta-content');"/>
</treecols>
<treechildren id="metatreechildren" flex="1"/>
</tree>
- </groupbox>
+ </vbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
</vbox>
<!-- Media information -->
<vbox id="mediaPanel">
<tree id="imagetree" onselect="onImageSelect();" contextmenu="picontext"
--- a/browser/themes/linux/pageInfo.css
+++ b/browser/themes/linux/pageInfo.css
@@ -93,45 +93,16 @@ textbox[disabled] {
font-style: italic;
}
/* General Tab */
#generalPanel > #titletext {
margin-inline-start: 5px;
}
-groupbox.collapsable caption .caption-icon {
- width: 9px;
- height: 9px;
- background-repeat: no-repeat;
- background-position: center;
- margin-inline-start: 1px;
- margin-inline-end: 3px;
- background-image: url("chrome://global/skin/tree/twisty-open.png");
-}
-
-groupbox.collapsable[closed="true"] {
- border: none;
-}
-
-groupbox.collapsable[closed="true"] caption .caption-icon {
- background-image: url("chrome://global/skin/tree/twisty-clsd.png");
-}
-
-groupbox tree {
- margin: 0;
- border: none;
-}
-
-groupbox.treebox .groupbox-body {
- margin-inline-start: 5px;
- margin-inline-end: 1px;
- padding-top: 0;
-}
-
#securityBox description {
margin-inline-start: 10px;
}
#general-security-identity {
white-space: pre-wrap;
line-height: 2em;
}
--- a/browser/themes/osx/pageInfo.css
+++ b/browser/themes/osx/pageInfo.css
@@ -67,37 +67,16 @@ textbox.header {
border: 1px solid ThreeDLightShadow;
}
textbox[disabled] {
font-style: italic;
}
/* General Tab */
-groupbox.collapsable caption .caption-icon {
- width: 11px;
- height: 11px;
- background-repeat: no-repeat;
- background-position: center;
- margin-inline-end: 2px;
- background-image: url("chrome://global/skin/arrow/arrow-dn.gif");
-}
-
-groupbox.collapsable[closed="true"] caption .caption-icon {
- background-image: url("chrome://global/skin/arrow/arrow-rit.gif");
-}
-
-groupbox tree {
- margin: 0;
- border: none;
-}
-
-groupbox.treebox .groupbox-body {
- padding: 0;
-}
#securityBox description {
margin-inline-start: 10px;
}
#general-security-identity {
white-space: pre-wrap;
line-height: 2em;
--- a/browser/themes/windows/pageInfo.css
+++ b/browser/themes/windows/pageInfo.css
@@ -117,40 +117,16 @@ textbox.header {
border: 1px solid ThreeDLightShadow;
}
textbox[disabled] {
font-style: italic;
}
/* General Tab */
-groupbox.collapsable caption .caption-icon {
- width: 9px;
- height: 9px;
- background-repeat: no-repeat;
- background-position: center;
- margin-inline-start: 2px;
- margin-inline-end: 2px;
- background-image: url("chrome://global/skin/tree/twisty.svg#open");
-}
-
-groupbox.collapsable[closed="true"] {
- border: none;
- margin-bottom: 9px;
- -moz-appearance: none;
-}
-
-groupbox.collapsable[closed="true"] caption .caption-icon {
- background-image: url("chrome://global/skin/tree/twisty.svg#clsd");
-}
-
-groupbox tree {
- margin: 0 3px;
- border: none;
-}
#securityBox description {
margin-inline-start: 10px;
}
#general-security-identity {
white-space: pre-wrap;
line-height: 2em;
deleted file mode 100644
index dce39aecc1887e897d4b23e7272bf7f977b6064a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/toolkit/themes/osx/global/jar.mn
+++ b/toolkit/themes/osx/global/jar.mn
@@ -43,17 +43,16 @@ toolkit.jar:
skin/classic/global/arrow/arrow-dn-dis.png (arrow/arrow-dn-dis.png)
skin/classic/global/arrow/arrow-dn-sharp.gif (arrow/arrow-dn-sharp.gif)
skin/classic/global/arrow/arrow-dn.gif (arrow/arrow-dn.gif)
skin/classic/global/arrow/arrow-dn.png (arrow/arrow-dn.png)
skin/classic/global/arrow/arrow-lft-dis.gif (arrow/arrow-lft-dis.gif)
skin/classic/global/arrow/arrow-lft-sharp.gif (arrow/arrow-lft-sharp.gif)
skin/classic/global/arrow/arrow-rit-dis.gif (arrow/arrow-rit-dis.gif)
skin/classic/global/arrow/arrow-rit-sharp.gif (arrow/arrow-rit-sharp.gif)
- skin/classic/global/arrow/arrow-rit.gif (arrow/arrow-rit.gif)
skin/classic/global/arrow/arrow-up-dis.gif (arrow/arrow-up-dis.gif)
skin/classic/global/arrow/arrow-up-sharp.gif (arrow/arrow-up-sharp.gif)
skin/classic/global/arrow/arrow-up.gif (arrow/arrow-up.gif)
skin/classic/global/arrow/panelarrow-horizontal.svg (arrow/panelarrow-horizontal.svg)
skin/classic/global/arrow/panelarrow-vertical.svg (arrow/panelarrow-vertical.svg)
skin/classic/global/checkbox/cbox-check.gif (checkbox/cbox-check.gif)
skin/classic/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif)
skin/classic/global/dirListing/dirListing.css (dirListing/dirListing.css)