mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
This commit is contained in:
parent
f4000effb3
commit
f616596d41
@ -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