зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1536157 - Schedule a paint when setting a pending visual scroll update. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D23901 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
47a363df69
Коммит
531d381209
|
@ -10699,6 +10699,19 @@ bool nsIPresShell::SetVisualViewportOffset(
|
|||
return didChange;
|
||||
}
|
||||
|
||||
void nsIPresShell::SetPendingVisualScrollUpdate(
|
||||
const nsPoint& aVisualViewportOffset,
|
||||
FrameMetrics::ScrollOffsetUpdateType aUpdateType) {
|
||||
mPendingVisualScrollUpdate =
|
||||
mozilla::Some(VisualScrollUpdate{aVisualViewportOffset, aUpdateType});
|
||||
|
||||
// The pending update is picked up during the next paint.
|
||||
// Schedule a paint to make sure one will happen.
|
||||
if (nsIFrame* rootFrame = GetRootFrame()) {
|
||||
rootFrame->SchedulePaint();
|
||||
}
|
||||
}
|
||||
|
||||
nsPoint nsIPresShell::GetVisualViewportOffsetRelativeToLayoutViewport() const {
|
||||
return GetVisualViewportOffset() - GetLayoutViewportOffset();
|
||||
}
|
||||
|
|
|
@ -1697,10 +1697,7 @@ class nsIPresShell : public nsStubDocumentObserver {
|
|||
// Please request APZ review if adding a new call site.
|
||||
void SetPendingVisualScrollUpdate(
|
||||
const nsPoint& aVisualViewportOffset,
|
||||
FrameMetrics::ScrollOffsetUpdateType aUpdateType) {
|
||||
mPendingVisualScrollUpdate =
|
||||
mozilla::Some(VisualScrollUpdate{aVisualViewportOffset, aUpdateType});
|
||||
}
|
||||
FrameMetrics::ScrollOffsetUpdateType aUpdateType);
|
||||
void ClearPendingVisualScrollUpdate() {
|
||||
mPendingVisualScrollUpdate = mozilla::Nothing();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче