Bug 1448841 - Part 3: Disable partial display list building when we have overlay scrollbars. r?mstange
MozReview-Commit-ID: HeMaqItUJdD
--- 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