From 7f4a92ec55eac3620fafe0f343d5aeaec37d610c Mon Sep 17 00:00:00 2001 From: roytam1 Date: Thu, 13 Feb 2025 21:02:15 +0800 Subject: [PATCH] import from mozilla: Bug 1350925 part 1 - Reset the scrolled frame's ReflowOutput overflow areas before re-using it for another child reflow. r=dholbert a=gchang (8c70d11ecd1) --- layout/generic/nsGfxScrollFrame.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 8328f70da5..f7eeef2f42 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -365,6 +365,7 @@ nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState, nsLayoutUtils::MarkIntrinsicISizesDirtyIfDependentOnBSize( mHelper.mScrolledFrame); } + aKidMetrics->mOverflowAreas.Clear(); ReflowScrolledFrame(aState, aAssumeHScroll, aAssumeVScroll, aKidMetrics, false); } @@ -719,6 +720,7 @@ nsHTMLScrollFrame::ReflowContents(ScrollReflowInput* aState, insideBorderSize); if (nsRect(nsPoint(0, 0), insideBorderSize).Contains(scrolledRect)) { // Let's pretend we had no scrollbars coming in here + kidDesiredSize.mOverflowAreas.Clear(); ReflowScrolledFrame(aState, false, false, &kidDesiredSize, false); } }