Bug 1350925 part 1 - Reset the scrolled frame's ReflowOutput overflow areas before re-using it for another child reflow. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Tue, 18 Apr 2017 22:35:05 +0200
changeset 353746 d71c10dda1ae10c41532fde9826c74d6b9b20613
parent 353745 ee2e388ae3d11c53568d47d1787a257a0dcbe7fe
child 353747 1b0ccddf5ff5f90fcf5ee1a2c4f2392204b29fc3
push id31676
push usercbook@mozilla.com
push dateWed, 19 Apr 2017 08:33:26 +0000
treeherdermozilla-central@a1b682b9b39d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1350925
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1350925 part 1 - Reset the scrolled frame's ReflowOutput overflow areas before re-using it for another child reflow. r=dholbert MozReview-Commit-ID: Ct57seTFsaj
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -336,16 +336,17 @@ nsHTMLScrollFrame::TryLayout(ScrollReflo
 
   if (aAssumeVScroll != aState->mReflowedContentsWithVScrollbar ||
       (aAssumeHScroll != aState->mReflowedContentsWithHScrollbar &&
        ScrolledContentDependsOnHeight(aState))) {
     if (aAssumeHScroll != aState->mReflowedContentsWithHScrollbar) {
       nsLayoutUtils::MarkIntrinsicISizesDirtyIfDependentOnBSize(
           mHelper.mScrolledFrame);
     }
+    aKidMetrics->mOverflowAreas.Clear();
     ReflowScrolledFrame(aState, aAssumeHScroll, aAssumeVScroll, aKidMetrics,
                         false);
   }
 
   nsSize vScrollbarMinSize(0, 0);
   nsSize vScrollbarPrefSize(0, 0);
   if (mHelper.mVScrollbarBox) {
     GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox,
@@ -689,16 +690,17 @@ nsHTMLScrollFrame::ReflowContents(Scroll
     nsSize insideBorderSize =
       ComputeInsideBorderSize(aState,
                               nsSize(kidDesiredSize.Width(), kidDesiredSize.Height()));
     nsRect scrolledRect =
       mHelper.GetUnsnappedScrolledRectInternal(kidDesiredSize.ScrollableOverflow(),
                                                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);
     }
   }
 
   // Try vertical scrollbar settings that leave the vertical scrollbar unchanged.
   // Do this first because changing the vertical scrollbar setting is expensive,
   // forcing a reflow always.