mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1665332. Fetch the value of mZoomableByAPZ in the ScrollFrameHelper constructor so it is always correct. r=kats
Otherwise the only time it gets set is when the ZoomConstraintsClient specifically sets it in response to one of the things that can change it. But if the scroll frame gets reconstructed and one of those things don't happen it will be wrong. This shows up with desktop zooming scrollbars because we check mZoomableByAPZ (or WantAsyncScroll()) before we use the apz scroll path in ScrollFrameHelper::ScrollBy(). Differential Revision: https://phabricator.services.mozilla.com/D90384
This commit is contained in:
parent
ffe6596576
commit
b40f06a081
@ -11756,3 +11756,7 @@ void PresShell::EndPaint() {
|
||||
void PresShell::PingPerTickTelemetry(FlushType aFlushType) {
|
||||
mLayoutTelemetry.PingPerTickTelemetry(aFlushType);
|
||||
}
|
||||
|
||||
bool PresShell::GetZoomableByAPZ() const {
|
||||
return mZoomConstraintsClient && mZoomConstraintsClient->GetAllowZoom();
|
||||
}
|
||||
|
@ -1680,6 +1680,8 @@ class PresShell final : public nsStubDocumentObserver,
|
||||
nsIFrame* GetDrawEventTargetFrame() { return mDrawEventTargetFrame; }
|
||||
#endif
|
||||
|
||||
bool GetZoomableByAPZ() const;
|
||||
|
||||
private:
|
||||
~PresShell();
|
||||
|
||||
|
@ -39,6 +39,8 @@ class ZoomConstraintsClient final : public nsIDOMEventListener,
|
||||
void Destroy();
|
||||
void ScreenSizeChanged();
|
||||
|
||||
bool GetAllowZoom() const { return mZoomConstraints.mAllowZoom; }
|
||||
|
||||
private:
|
||||
void RefreshZoomConstraints();
|
||||
|
||||
|
@ -2225,6 +2225,10 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter, bool aIsRoot)
|
||||
mOuter->GetContent(), mOuter->PresShell(), ScreenMargin(), 0);
|
||||
nsLayoutUtils::SetZeroMarginDisplayPortOnAsyncScrollableAncestors(mOuter);
|
||||
}
|
||||
|
||||
if (mIsRoot) {
|
||||
mZoomableByAPZ = mOuter->PresShell()->GetZoomableByAPZ();
|
||||
}
|
||||
}
|
||||
|
||||
ScrollFrameHelper::~ScrollFrameHelper() {
|
||||
|
Loading…
Reference in New Issue
Block a user