diff options
Diffstat (limited to 'layout/generic/nsCanvasFrame.cpp')
-rw-r--r-- | layout/generic/nsCanvasFrame.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index b4b108905f..36b579ed60 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -546,6 +546,8 @@ void nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, layers.mImageCount > 0 && layers.mLayers[0].mAttachment == StyleImageLayerAttachment::Fixed; + nsDisplayList list(aBuilder); + if (!hasFixedBottomLayer || needBlendContainer) { // Put a scrolled background color item in place, at the bottom of the // list. The color of this item will be filled in during @@ -557,20 +559,18 @@ void nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // interleaving the two with a scrolled background color. // PresShell::AddCanvasBackgroundColorItem makes sure there always is a // non-scrolled background color item at the bottom. - aLists.BorderBackground()->AppendNewToTop<nsDisplayCanvasBackgroundColor>( - aBuilder, this); + list.AppendNewToTop<nsDisplayCanvasBackgroundColor>(aBuilder, this); } - aLists.BorderBackground()->AppendToTop(&layerItems); + list.AppendToTop(&layerItems); if (needBlendContainer) { const ActiveScrolledRoot* containerASR = contASRTracker.GetContainerASR(); DisplayListClipState::AutoSaveRestore blendContainerClip(aBuilder); - aLists.BorderBackground()->AppendToTop( - nsDisplayBlendContainer::CreateForBackgroundBlendMode( - aBuilder, this, nullptr, aLists.BorderBackground(), - containerASR)); + list.AppendToTop(nsDisplayBlendContainer::CreateForBackgroundBlendMode( + aBuilder, this, nullptr, &list, containerASR)); } + aLists.BorderBackground()->AppendToTop(&list); } for (nsIFrame* kid : PrincipalChildList()) { |