mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Use the correct area for computing the gradient image for 'background-position: fixed' gradients. (Bug 509681) r=roc
This commit is contained in:
parent
b4f7befaba
commit
393f4ad8c7
@ -1963,10 +1963,6 @@ PaintBackgroundLayer(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
nsSize imageSize = imageRenderer.ComputeSize(bgPositioningArea.Size());
|
||||
if (imageSize.width <= 0 || imageSize.height <= 0)
|
||||
return;
|
||||
|
||||
// Compute the anchor point.
|
||||
//
|
||||
// relative to aBorderArea.TopLeft() (which is where the top-left
|
||||
@ -2006,6 +2002,10 @@ PaintBackgroundLayer(nsPresContext* aPresContext,
|
||||
} else {
|
||||
offset = bgPositioningArea.TopLeft();
|
||||
}
|
||||
|
||||
nsSize imageSize = imageRenderer.ComputeSize(bgPositioningArea.Size());
|
||||
if (imageSize.width <= 0 || imageSize.height <= 0)
|
||||
return;
|
||||
|
||||
// Scale the image as specified for background-size and as required for
|
||||
// proper background positioning when background-position is defined with
|
||||
|
1
layout/reftests/css-gradients/linear-viewport-ref.html
Normal file
1
layout/reftests/css-gradients/linear-viewport-ref.html
Normal file
@ -0,0 +1 @@
|
||||
<body style="border: 0; margin: 0; padding: 0;"><div style="background: -moz-linear-gradient(top, bottom, from(blue), to(aqua)) no-repeat; width: 100%; height: 100%;"> </div></body>
|
2
layout/reftests/css-gradients/linear-viewport.html
Normal file
2
layout/reftests/css-gradients/linear-viewport.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- bug 509681 -->
|
||||
<body style="background: -moz-linear-gradient(top, bottom, from(blue), to(aqua)) fixed no-repeat;">
|
@ -6,3 +6,4 @@
|
||||
== nostops.html nostops-ref.html
|
||||
== onestop.html onestop-ref.html
|
||||
== twostops.html twostops-ref.html
|
||||
== linear-viewport.html linear-viewport-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user