Fix frame tree mangling when a combobox is inside a pseudo-cell. Bug 275746,

r=bernd, sr=roc


git-svn-id: svn://10.0.0.236/trunk@168661 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-02-01 21:01:31 +00:00
parent 0b68b02fa0
commit 8632f162de

View File

@@ -4806,10 +4806,24 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
// Create display and button frames from the combobox's anonymous content.
// The anonymous content is appended to existing anonymous content for this
// element (the scrollbars).
// save the incoming pseudo frame state, so that we don't end up
// with those pseudoframes in childItems
nsPseudoFrames priorPseudoFrames;
aState.mPseudoFrames.Reset(&priorPseudoFrames);
nsFrameItems childItems;
CreateAnonymousFrames(aPresShell, aPresContext, nsHTMLAtoms::combobox,
aState, aContent, comboboxFrame, PR_TRUE, childItems);
// process the current pseudo frame state
if (!aState.mPseudoFrames.IsEmpty()) {
ProcessPseudoFrames(aPresContext, aState.mPseudoFrames, childItems);
}
// restore the incoming pseudo frame state
aState.mPseudoFrames = priorPseudoFrames;
comboboxFrame->SetInitialChildList(aPresContext, nsnull,
childItems.childList);