mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1148022 - When frame metrics are attached to the container layer of the root scroll frame, make sure that its scroll frame is active. r=tn
--HG-- extra : rebase_source : bb0f77645cd023a6c4f086a54c89a3338bf4faee
This commit is contained in:
parent
26d26823cd
commit
6d2f0151ad
@ -1937,6 +1937,7 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
|
||||
, mHasBeenScrolledRecently(false)
|
||||
, mCollapsedResizer(false)
|
||||
, mShouldBuildScrollableLayer(false)
|
||||
, mIsScrollableLayerInRootContainer(false)
|
||||
, mHasBeenScrolled(false)
|
||||
, mIsResolutionSet(false)
|
||||
, mIgnoreMomentumScroll(false)
|
||||
@ -2940,6 +2941,14 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
// adjusted by the APZC automatically.
|
||||
bool usingDisplayPort = aBuilder->IsPaintingToWindow() &&
|
||||
nsLayoutUtils::GetDisplayPort(mOuter->GetContent());
|
||||
|
||||
if (usingDisplayPort) {
|
||||
// There is a display port for this frame, so we want to appear as having
|
||||
// active scrolling, so that animated geometry roots are assigned correctly.
|
||||
mShouldBuildScrollableLayer = true;
|
||||
mIsScrollableLayerInRootContainer = true;
|
||||
}
|
||||
|
||||
bool addScrollBars = mIsRoot && usingDisplayPort && !aBuilder->IsForEventDelivery();
|
||||
|
||||
if (addScrollBars) {
|
||||
@ -3221,7 +3230,7 @@ ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer,
|
||||
*aClipRect = scrollport;
|
||||
}
|
||||
|
||||
if (!mShouldBuildScrollableLayer) {
|
||||
if (!mShouldBuildScrollableLayer || mIsScrollableLayerInRootContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -500,6 +500,12 @@ public:
|
||||
// scrollable layer. Used for asynchronous scrolling.
|
||||
bool mShouldBuildScrollableLayer:1;
|
||||
|
||||
// Whether we are the root scroll frame that is used for containerful
|
||||
// scrolling with a display port. If true, the scrollable frame
|
||||
// shouldn't attach frame metrics to its layers because the container
|
||||
// will already have the necessary frame metrics.
|
||||
bool mIsScrollableLayerInRootContainer:1;
|
||||
|
||||
// If true, add clipping in ScrollFrameHelper::ComputeFrameMetrics.
|
||||
bool mAddClipRectToLayer:1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user