зеркало из https://github.com/mozilla/gecko-dev.git
Fix for 48450. r=morse
This commit is contained in:
Родитель
d854d084a2
Коммит
36d75d26c9
|
@ -120,27 +120,17 @@ function AppendStringToTreelist(tree, string)
|
||||||
{
|
{
|
||||||
if (tree)
|
if (tree)
|
||||||
{
|
{
|
||||||
var treechildren = tree.firstChild;
|
var treechildren = document.getElementById('child');
|
||||||
if (!treechildren)
|
|
||||||
{
|
|
||||||
treechildren = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treechildren");
|
|
||||||
if (treechildren)
|
|
||||||
tree.appendChild(treechildren);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dump("Failed to create <treechildren>\n");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var treeitem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treeitem");
|
var treeitem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treeitem");
|
||||||
var treerow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treerow");
|
var treerow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treerow");
|
||||||
var treecell = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treecell");
|
var treecell = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treecell");
|
||||||
if (treeitem && treerow && treecell)
|
if (treeitem && treerow && treecell)
|
||||||
{
|
{
|
||||||
|
treecell.setAttribute("value", string);
|
||||||
treerow.appendChild(treecell);
|
treerow.appendChild(treecell);
|
||||||
treeitem.appendChild(treerow);
|
treeitem.appendChild(treerow);
|
||||||
treechildren.appendChild(treeitem)
|
treechildren.appendChild(treeitem)
|
||||||
treecell.setAttribute("value", string);
|
|
||||||
var len = Number(tree.getAttribute("length"));
|
var len = Number(tree.getAttribute("length"));
|
||||||
if (!len) len = -1;
|
if (!len) len = -1;
|
||||||
tree.setAttribute("length",len+1);
|
tree.setAttribute("length",len+1);
|
||||||
|
|
|
@ -36,7 +36,12 @@ Contributor(s): ______________________________________. -->
|
||||||
<box align="vertical" style="width: 24em;margin: 5px;">
|
<box align="vertical" style="width: 24em;margin: 5px;">
|
||||||
<text id="info.txt" class="label"/>
|
<text id="info.txt" class="label"/>
|
||||||
<box orient="vertical">
|
<box orient="vertical">
|
||||||
<tree rows="4" class="list" id="list" flex="1"/>
|
<tree rows="4" class="list" id="list" flex="1">
|
||||||
|
<treecolgroup>
|
||||||
|
<treecol flex="1"/>
|
||||||
|
</treecolgroup>
|
||||||
|
<treechildren flex="1" id="child"/>
|
||||||
|
</tree>
|
||||||
</box>
|
</box>
|
||||||
</box>
|
</box>
|
||||||
<box id="okCancelButtons"/>
|
<box id="okCancelButtons"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче