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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user