Bug 1221094 - Don't mutate local mParameters with stuff that we only want to pass somewhere else. r?mattwoodrow
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -4060,26 +4060,27 @@ ContainerState::ProcessDisplayItems(nsDi
// be too small if the contents can move, because it only looks at the
// contents' current bounds and doesn't anticipate any animations.
// Time will tell whether this is good enough, or whether we need to do
// something more sophisticated here.
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot,
&itemVisibleRect, uniformColorPtr);
}
- mParameters.mBackgroundColor = uniformColor;
- mParameters.mScrollClip = DisplayItemScrollClip::PickInnermost(agrScrollClip, mContainerScrollClip);
+ ContainerLayerParameters params = mParameters;
+ params.mScrollClip = DisplayItemScrollClip::PickInnermost(agrScrollClip, mContainerScrollClip);
+ params.mBackgroundColor = uniformColor;
// Just use its layer.
// Set layerContentsVisibleRect.width/height to -1 to indicate we
// currently don't know. If BuildContainerLayerFor gets called by
// item->BuildLayer, this will be set to a proper rect.
nsIntRect layerContentsVisibleRect(0, 0, -1, -1);
- mParameters.mLayerContentsVisibleRect = &layerContentsVisibleRect;
- RefPtr<Layer> ownLayer = item->BuildLayer(mBuilder, mManager, mParameters);
+ params.mLayerContentsVisibleRect = &layerContentsVisibleRect;
+ RefPtr<Layer> ownLayer = item->BuildLayer(mBuilder, mManager, params);
if (!ownLayer) {
continue;
}
NS_ASSERTION(!ownLayer->AsPaintedLayer(),
"Should never have created a dedicated Painted layer!");
if (item->BackfaceIsHidden()) {