Bug 916125. Clip scroll layer items to the scroll port so the resulting layers have the proper clip. r=roc

This commit is contained in:
Timothy Nikkel 2013-10-17 17:02:42 -05:00
parent f38b7cf3b6
commit 93e4b6b2d2

View File

@ -2366,6 +2366,13 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
ScrollLayerWrapper wrapper(mOuter, mScrolledFrame);
if (usingDisplayport) {
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
nsRect clip = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
if (mClipAllDescendants) {
clipState.ClipContentDescendants(clip);
} else {
clipState.ClipContainingBlockDescendants(clip);
}
// Once a displayport is set, assume that scrolling needs to be fast
// so create a layer with all the content inside. The compositor
// process will be able to scroll the content asynchronously.