Bug 1448841 - Part 3: Disable partial display list building when we have overlay scrollbars. r?mstange draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 29 Mar 2018 23:01:47 +1300
changeset 774657 26ed5bc615c6b3cc0481360ee281b033e245b8e6
parent 774656 6f8115aa6e465409665124a7f4c0a5051d1b8bb8
child 774658 a4566f8061471f04b181b58d18cee58a0ddffb55
push id104469
push usermwoodrow@mozilla.com
push dateThu, 29 Mar 2018 10:04:03 +0000
reviewersmstange
bugs1448841
milestone61.0a1
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