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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user