mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Bug 1080205. Part 1: Don't add clip rects to async-scrolled layers for root scrollframes, since the FrameMetrics to scroll those layers will be set on a ContainerLayer parent. r=tn
--HG-- extra : rebase_source : b8fc0e3c97d5be50443734ed80caafabd37cf1a3
This commit is contained in:
parent
6b0fb73717
commit
ba470b0a04
@ -2800,6 +2800,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
mOuter->PresContext()->IsRootContentDocument();
|
||||
|
||||
if (aBuilder->GetIgnoreScrollFrame() == mOuter || IsIgnoringViewportClipping()) {
|
||||
mAddClipRectToLayer = false;
|
||||
|
||||
// If we are a root scroll frame that has a display port we want to add
|
||||
// scrollbars, they will be children of the scrollable layer, but they get
|
||||
@ -2829,6 +2830,9 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
return;
|
||||
}
|
||||
|
||||
mAddClipRectToLayer =
|
||||
!(mIsRoot && mOuter->PresContext()->PresShell()->GetIsViewportOverridden());
|
||||
|
||||
// Overflow clipping can never clip frames outside our subtree, so there
|
||||
// is no need to worry about whether we are a moving frame that might clip
|
||||
// non-moving frames.
|
||||
@ -3049,7 +3053,9 @@ ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer,
|
||||
{
|
||||
nsRect scrollport = mScrollPort +
|
||||
mOuter->GetOffsetToCrossDoc(aContainerReferenceFrame);
|
||||
if (!(mIsRoot && mOuter->PresContext()->PresShell()->GetIsViewportOverridden())) {
|
||||
// Root scrollframes have FrameMetrics and clipping on their container layers,
|
||||
// so don't also apply clipping here.
|
||||
if (mAddClipRectToLayer) {
|
||||
*aClipRect = scrollport;
|
||||
}
|
||||
|
||||
|
@ -450,6 +450,8 @@ public:
|
||||
// If true, the layer should always be active because we always build a
|
||||
// scrollable layer. Used for asynchronous scrolling.
|
||||
bool mShouldBuildScrollableLayer:1;
|
||||
// If true, add clipping in ScrollFrameHelper::ComputeFrameMetrics.
|
||||
bool mAddClipRectToLayer:1;
|
||||
|
||||
// True if this frame has been scrolled at least once
|
||||
bool mHasBeenScrolled:1;
|
||||
|
Loading…
Reference in New Issue
Block a user