Bug 331590. Treat inline-box/grid/stack XUL elements like inline blocks, making them pseudo-stacking-contexts. r+sr=dbaron

This commit is contained in:
roc+%cs.cmu.edu 2006-06-08 03:35:29 +00:00
parent e7e6b5ae2a
commit 82e7436876

View File

@ -1287,15 +1287,19 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (aChild->GetStateBits() & NS_FRAME_IS_UNFLOWABLE)
return NS_OK;
// XXX we really need IsFrameOfType() here
nsIAtom* childType = aChild->GetType();
const nsStyleDisplay* disp = aChild->GetStyleDisplay();
// PR_TRUE if this is a real or pseudo stacking context
PRBool pseudoStackingContext =
(aFlags & DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT) != 0;
// XXX we REALLY need a "are you an inline-block sort of thing?" here!!!
if ((aFlags & DISPLAY_CHILD_INLINE) &&
(aChild->IsContainingBlock() ||
childType == nsLayoutAtoms::tableOuterFrame ||
childType == nsLayoutAtoms::listControlFrame)) {
childType == nsLayoutAtoms::listControlFrame ||
disp->mDisplay == NS_STYLE_DISPLAY_INLINE_BOX ||
disp->mDisplay == NS_STYLE_DISPLAY_INLINE_GRID ||
disp->mDisplay == NS_STYLE_DISPLAY_INLINE_STACK)) {
// child is a block or table-like frame in an inline context, i.e.,
// it acts like inline-block or inline-table. Therefore it is a
// pseudo-stacking-context.
@ -1361,7 +1365,6 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
}
#endif
const nsStyleDisplay* disp = aChild->GetStyleDisplay();
PRBool isComposited = disp->mOpacity != 1.0f;
PRBool isPositioned = disp->IsPositioned();
if (isComposited || isPositioned) {