Bug 78087. Propagate the canvas background to be the background of the entire viewport so it z-orders correctly in the viewport's stacking context. r+sr=dbaron

This commit is contained in:
roc+%cs.cmu.edu 2006-02-05 20:52:13 +00:00
Родитель 5dedb3845c
Коммит 9acb9492ec
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -1392,7 +1392,8 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
NS_ENSURE_SUCCESS(rv, rv);
nsRect clip = frameClip + aBuilder->ToReferenceFrame(mOuter);
// mScrolledFrame may have given us a background, e.g., the scrolled canvas
// frame below the viewport. If so, we want it to be clipped.
// frame below the viewport. If so, we want it to be clipped. We also want
// to end up on our BorderBackground list.
// If we are the viewport scrollframe, then clip all our descendants (to ensure
// that fixed-pos elements get clipped by us).
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, PR_TRUE, mIsRoot);

Просмотреть файл

@ -89,10 +89,12 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// that display list construction is guaranteed to recurse into their
// ancestors.
MarkOutOfFlowChildrenForDisplayList(mFixedContainer.GetFirstChild(), aDirtyRect);
// Put the regular child in a pseudo-stack.
nsresult rv =
BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists,
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
nsIFrame* kid = mFrames.FirstChild();
nsresult rv = NS_OK;
if (kid) {
// make the kid's BorderBackground our own.
rv = BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
}
UnmarkOutOfFlowChildrenForDisplayList(mFixedContainer.GetFirstChild());
return rv;
}