Fix JS warnings in previous checkin to bug 38367 r=varga sr=bz
git-svn-id: svn://10.0.0.236/trunk@140689 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -141,21 +141,20 @@
|
||||
|
||||
<handler event="popupshowing" phase="target">
|
||||
<![CDATA[
|
||||
// XXX Remove when phase="target" works
|
||||
if (event.target != this)
|
||||
return;
|
||||
var array = [];
|
||||
var width = 0;
|
||||
for (var menuitem = this.firstChild; menuitem; menuitem = menuitem.nextSibling) {
|
||||
var accel = document.getAnonymousElementByAttribute(menuitem, "anonid", "accel");
|
||||
if (accel && accel.label && accel.boxObject) {
|
||||
array.push(accel);
|
||||
if (accel.boxObject.width > width)
|
||||
width = accel.boxObject.width;
|
||||
if (menuitem.localName == "menuitem" && menuitem.hasAttribute("acceltext")) {
|
||||
var accel = document.getAnonymousElementByAttribute(menuitem, "anonid", "accel");
|
||||
if (accel && accel.boxObject) {
|
||||
array.push(accel);
|
||||
if (accel.boxObject.width > width)
|
||||
width = accel.boxObject.width;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < array.length; i++)
|
||||
array[i].setAttribute("width", width);
|
||||
array[i].width = width;
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
|
||||
Reference in New Issue
Block a user