Bug 536720 - Don't say the frame is in the nsGkAtoms::popupList if that list is empty. r=fantasai

This commit is contained in:
Mats Palmgren 2010-06-27 22:53:59 +02:00
parent 67b49c2d58
commit ba0d9a576a
5 changed files with 48 additions and 3 deletions

View File

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="text/javascript">
<![CDATA[
function boom()
{
var menupopup = document.getElementById("menupopup");
menupopup.parentNode.removeChild(menupopup);
}
window.addEventListener("load", boom, false);
]]>
</script>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><menulist><menupopup id="menupopup"/>
T
</menulist></window>
</window>

View File

@ -0,0 +1,18 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
function boom()
{
var a = document.getElementById("a");
while (a.firstChild)
a.removeChild(a.firstChild);
}
window.addEventListener("load", boom, false);
</script>
<menulist id="a" sizetopopup="pref"><menupopup/><menupopup/></menulist>
</window>

View File

@ -0,0 +1,3 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="var p=document.getElementById('p'); for(var i=0;i!=3;++i)p.parentNode.appendChild(p);">
<menuitem style="counter-reset: chicken;">P<popup id="p" style="counter-reset: chicken;"/></menuitem>
</window>

View File

@ -284,16 +284,19 @@ load 534367-1.xhtml
load 535721-1.xhtml
load 535911-1.xhtml
load 536623-1.xhtml
load 536720.xul
load 537059-1.xhtml
load 537141-1.xhtml
load 537562-1.xhtml
load 538082-1.xul
load 538207-1.xhtml
load 538210-1.html
load 540760.xul
load 541869-1.xhtml
load 541869-2.html
load 560441-1.xhtml
load 560447-1.html
load 564063-1.html
load 567292-1.xhtml
load 572003.xul
load 572582-1.xhtml

View File

@ -248,9 +248,7 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
: nsnull;
NS_ASSERTION(!firstPopup || !firstPopup->GetNextSibling(),
"We assume popupList only has one child, but it has more.");
listName = (!firstPopup || firstPopup == aChildFrame)
? nsGkAtoms::popupList
: nsnull;
listName = firstPopup == aChildFrame ? nsGkAtoms::popupList : nsnull;
} else if (nsGkAtoms::tableColGroupFrame == childType) {
listName = nsGkAtoms::colGroupList;
} else if (nsGkAtoms::tableCaptionFrame == aChildFrame->GetType()) {