Backed out as it made performance worse for some reason

This commit is contained in:
2007-09-14 13:31:37 -07:00
parent 933797394c
commit 793815ebcd
2 changed files with 16 additions and 25 deletions

View File

@@ -254,30 +254,6 @@ nsMenuPopupFrame::SetInitialChildList(nsIAtom* aListName,
return nsBoxFrame::SetInitialChildList(aListName, aChildList);
}
PRBool
nsMenuPopupFrame::IsLeaf() const
{
if (mGeneratedChildren)
return PR_FALSE;
// any popup with a type attribute, such as the autocomplete popup,
// is always generated right away.
if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::type))
return PR_FALSE;
if (mPopupType != ePopupTypeMenu)
return PR_TRUE;
// menu popups generate their child frames lazily only when opened, so
// behave like a leaf frame. However, generate child frames normally if
// the parent menu has a sizetopopup attribute. In this case the size of
// the parent menu is dependant on the size of the popup, so the frames
// need to exist in order to calculate this size.
nsIContent* parentContent = mContent->GetParent();
return (parentContent &&
!parentContent->HasAttr(kNameSpaceID_None, nsGkAtoms::sizetopopup));
}
void
nsMenuPopupFrame::AdjustView()
{