Bug 1925476 - Remove ScrollContainerFrame::DidReflow. r=jwatt

It's not needed, ReflowFinished runs less often but still
unconditionally for scroll containers when we reflow, so it's a fine
place to post async work.

Differential Revision: https://phabricator.services.mozilla.com/D226116
This commit is contained in:
Emilio Cobos Álvarez
2024-10-18 12:09:37 +00:00
parent 4f1480b0ee
commit 9b80f0fb36
2 changed files with 6 additions and 12 deletions

View File

@@ -1630,16 +1630,6 @@ void ScrollContainerFrame::Reflow(nsPresContext* aPresContext,
PostOverflowEvent();
}
void ScrollContainerFrame::DidReflow(nsPresContext* aPresContext,
const ReflowInput* aReflowInput) {
nsContainerFrame::DidReflow(aPresContext, aReflowInput);
if (NeedsResnap()) {
PostPendingResnap();
} else {
PresShell()->PostPendingScrollAnchorAdjustment(Anchor());
}
}
////////////////////////////////////////////////////////////////////////////////
#ifdef DEBUG_FRAME_DUMP
@@ -6146,6 +6136,12 @@ bool ScrollContainerFrame::ReflowFinished() {
TryScheduleScrollAnimations();
if (NeedsResnap()) {
PostPendingResnap();
} else {
PresShell()->PostPendingScrollAnchorAdjustment(Anchor());
}
if (mIsRoot) {
if (mMinimumScaleSizeChanged && PresShell()->UsesMobileViewportSizing() &&
!PresShell()->IsResolutionUpdatedByApz()) {