mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 928441 - Don't clip to the scrollport on root scrollframes if the CSS viewport has been overridden. r=tn,roc
This commit is contained in:
parent
125bd727f4
commit
0ee526caa4
@ -2372,12 +2372,21 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
if (usingDisplayport) {
|
||||
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
|
||||
nsRect clip = mScrollPort + aBuilder->ToReferenceFrame(mOuter);
|
||||
if (mClipAllDescendants) {
|
||||
clipState.ClipContentDescendants(clip);
|
||||
} else {
|
||||
clipState.ClipContainingBlockDescendants(clip);
|
||||
|
||||
// For root scrollframes in documents where the CSS viewport has been
|
||||
// modified, the CSS viewport no longer corresponds to what is visible,
|
||||
// so we don't want to clip the content to it. For root scrollframes
|
||||
// in documents where the CSS viewport is NOT modified, the mScrollPort
|
||||
// is the same as the CSS viewport, modulo scrollbars.
|
||||
if (!(mIsRoot && mOuter->PresContext()->PresShell()->GetIsViewportOverridden())) {
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user