Bug 819837 - Always treat empty images as being background-attachment:scroll, r=roc

This commit is contained in:
Matt Woodrow 2012-12-10 18:34:15 +13:00
Родитель 9e778bb00f
Коммит acc7b82670
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -2845,7 +2845,8 @@ nsCSSRendering::ComputeBackgroundPositioningArea(nsPresContext* aPresContext,
} }
nsIFrame* attachedToFrame = aForFrame; nsIFrame* attachedToFrame = aForFrame;
if (NS_STYLE_BG_ATTACHMENT_FIXED == aLayer.mAttachment) { if (NS_STYLE_BG_ATTACHMENT_FIXED == aLayer.mAttachment &&
!aLayer.mImage.IsEmpty()) {
// If it's a fixed background attachment, then the image is placed // If it's a fixed background attachment, then the image is placed
// relative to the viewport, which is the area of the root frame // relative to the viewport, which is the area of the root frame
// in a screen context or the page content frame in a print context. // in a screen context or the page content frame in a print context.