Bug 1450360 - Reland chunk that got accidentally removed during a branch merge. r=mattwoodrow
☠☠ backed out by d112cf7b2b60 ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 04 Apr 2018 10:56:55 +1200
changeset 777150 08c9beb155d5233f1e57073b44e9175ef6231de3
parent 777149 6415ccbf739f36f71548540bd92c3b86ab9e1529
child 777151 373a7a3e5c8f84c658a4e6ca1d2e28905ea25b10
push id105088
push userjdescottes@mozilla.com
push dateWed, 04 Apr 2018 10:12:11 +0000
reviewersmattwoodrow
bugs1450360
milestone61.0a1
Bug 1450360 - Reland chunk that got accidentally removed during a branch merge. r=mattwoodrow MozReview-Commit-ID: MvE411GaHO
layout/painting/RetainedDisplayListBuilder.cpp
--- a/layout/painting/RetainedDisplayListBuilder.cpp
+++ b/layout/painting/RetainedDisplayListBuilder.cpp
@@ -1106,16 +1106,24 @@ RetainedDisplayListBuilder::AttemptParti
   AutoClearFramePropsArray modifiedFrames;
   AutoClearFramePropsArray framesWithProps;
   GetModifiedAndFramesWithProps(&mBuilder, &modifiedFrames.Frames(), &framesWithProps.Frames());
 
   // Do not allow partial builds if the retained display list is empty, or if
   // ShouldBuildPartial heuristic fails.
   const bool shouldBuildPartial = !mList.IsEmpty() && ShouldBuildPartial(modifiedFrames.Frames());
 
+  // We don't support retaining with overlay scrollbars, since they require
+  // us to look at the display list and pick the highest z-index, which
+  // we can't do during partial building.
+  if (mBuilder.BuiltOverlayScrollbars()) {
+    shouldBuildPartial = false;
+    mBuilder.SetBuiltOverlayScrollbars(false);
+  }
+
   if (mPreviousCaret != mBuilder.GetCaretFrame()) {
     if (mPreviousCaret) {
       if (mBuilder.MarkFrameModifiedDuringBuilding(mPreviousCaret)) {
         modifiedFrames.Frames().AppendElement(mPreviousCaret);
       }
     }
 
     if (mBuilder.GetCaretFrame()) {