mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1166301 - Layerize background images fixed to child elements. r=mattwoodrow
--HG-- extra : source : d5e8112052b1de93f41e15ea1ed6ccf80b498815
This commit is contained in:
parent
692b08c7cb
commit
d86a4b0d3f
@ -2360,15 +2360,14 @@ nsDisplayBackgroundImage::IsSingleFixedPositionImage(nsDisplayListBuilder* aBuil
|
||||
bool
|
||||
nsDisplayBackgroundImage::ShouldFixToViewport(LayerManager* aManager)
|
||||
{
|
||||
// APZ doesn't (yet) know how to scroll the visible region for these type of
|
||||
// items, so don't layerize them if it's enabled.
|
||||
if (nsLayoutUtils::UsesAsyncScrolling(mFrame) ||
|
||||
(aManager && aManager->ShouldAvoidComponentAlphaLayers())) {
|
||||
// APZ needs background-attachment:fixed images layerized for correctness.
|
||||
if (!nsLayoutUtils::UsesAsyncScrolling(mFrame) &&
|
||||
aManager && aManager->ShouldAvoidComponentAlphaLayers()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Put background-attachment:fixed background images in their own
|
||||
// compositing layer, unless we have APZ enabled
|
||||
// compositing layer.
|
||||
return mBackgroundStyle->mLayers[mLayer].mAttachment == NS_STYLE_BG_ATTACHMENT_FIXED &&
|
||||
!mBackgroundStyle->mLayers[mLayer].mImage.IsEmpty();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user