From 4d75bdec5dbd62763a63a3b14aa8a6d574a10d4d Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 19 Sep 2006 20:58:36 +0000 Subject: [PATCH] Bug 349477. Generalize handling of non-inline frames in inline contexts so they all make pseudo-stacking-contexts. r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@212016 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrame.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 94b16b9fd4d..e7d8577eea6 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -1282,20 +1282,16 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder, if (aChild->GetStateBits() & NS_FRAME_IS_UNFLOWABLE) return NS_OK; - 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 || - 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., + (disp->mDisplay != NS_STYLE_DISPLAY_INLINE || + aChild->IsContainingBlock() || + (aChild->GetStateBits() & NS_FRAME_REPLACED_ELEMENT))) { + // child is a non-inline frame in an inline context, i.e., // it acts like inline-block or inline-table. Therefore it is a // pseudo-stacking-context. pseudoStackingContext = PR_TRUE; @@ -1304,6 +1300,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder, // dirty rect in child-relative coordinates nsRect dirty = aDirtyRect - aChild->GetOffsetTo(this); + nsIAtom* childType = aChild->GetType(); if (childType == nsLayoutAtoms::placeholderFrame) { nsPlaceholderFrame* placeholder = NS_STATIC_CAST(nsPlaceholderFrame*, aChild); aChild = placeholder->GetOutOfFlowFrame();