Bug 1448841 - Part 3: Disable partial display list building when we have overlay scrollbars. r=mstange
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 29 Mar 2018 23:01:47 +1300
changeset 410712 130a8f287efe6f34a909090b3386fc72ebf4f358
parent 410711 f49364d5ebad1bdc8db3c3b7ef785335feefadc8
child 410713 fba4de2167c2e96e79d4626ad60230c369d902e0
push id33735
push usershindli@mozilla.com
push dateFri, 30 Mar 2018 09:55:46 +0000
treeherdermozilla-central@3f37287132bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1448841
milestone61.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 1448841 - Part 3: Disable partial display list building when we have overlay scrollbars. r=mstange MozReview-Commit-ID: HeMaqItUJdD
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -3345,16 +3345,25 @@ ScrollFrameHelper::BuildDisplayList(nsDi
       if (mScrollPosForLayerPixelAlignment == nsPoint(-1,-1)) {
         mScrollPosForLayerPixelAlignment = mScrollPosAtLastPaint;
       }
     } else {
       mScrollPosForLayerPixelAlignment = nsPoint(-1,-1);
     }
   }
 
+  // Adding overlay scrollbars requires us to look at the display list
+  // for the highest z-index item, which isn't possible during partial
+  // building. Mark the frame modified and do a full rebuild of this
+  // scrollframe.
+  if (LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) &&
+      aBuilder->IsRetainingDisplayList()) {
+    aBuilder->MarkCurrentFrameModifiedDuringBuilding();
+  }
+
   // It's safe to get this value before the DecideScrollableLayer call below
   // because that call cannot create a displayport for root scroll frames,
   // and hence it cannot create an ignore scroll frame.
   bool ignoringThisScrollFrame =
     aBuilder->GetIgnoreScrollFrame() == mOuter || IsIgnoringViewportClipping();
 
   // Overflow clipping can never clip frames outside our subtree, so there
   // is no need to worry about whether we are a moving frame that might clip