Bug 404314, create widget when setting menugenerated attribute, prevents assertion and issues with menu selection, r+sr=roc

This commit is contained in:
Neil Deakin 2008-12-19 08:43:24 -05:00
parent 4ed141a6e6
commit d842887270

View File

@ -1669,6 +1669,7 @@ nsMenuPopupFrame::AttributeChanged(PRInt32 aNameSpaceID,
// menugenerated attribute is set, see bug 279703 comment 42 for discussion
if (aAttribute == nsGkAtoms::menugenerated &&
mFrames.IsEmpty() && !mGeneratedChildren) {
EnsureWidget();
PresContext()->PresShell()->FrameConstructor()->
AddLazyChildren(mContent, LazyGeneratePopupDone, nsnull, PR_TRUE);
}