mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
Backed out changeset adc1960091eb (bug 1291528)
This commit is contained in:
parent
5330c39ccd
commit
f887eec24a
@ -2746,15 +2746,15 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
|
|||||||
|
|
||||||
// Fit the gradient line exactly into the source rect.
|
// Fit the gradient line exactly into the source rect.
|
||||||
if (lineStart.x != lineEnd.x) {
|
if (lineStart.x != lineEnd.x) {
|
||||||
rectLen = aPresContext->CSSPixelsToDevPixels(aSrc.width);
|
rectLen = srcSize.width;
|
||||||
offset = ((double)aSrc.x - lineStart.x) / lineLength;
|
offset = ((double)aSrc.x - lineStart.x) / lineLength;
|
||||||
lineStart.x = aSrc.x;
|
lineStart.x = aSrc.x;
|
||||||
lineEnd.x = aSrc.x + rectLen;
|
lineEnd.x = aSrc.x + srcSize.width;
|
||||||
} else {
|
} else {
|
||||||
rectLen = aPresContext->CSSPixelsToDevPixels(aSrc.height);
|
rectLen = srcSize.height;
|
||||||
offset = ((double)aSrc.y - lineStart.y) / lineLength;
|
offset = ((double)aSrc.y - lineStart.y) / lineLength;
|
||||||
lineStart.y = aSrc.y;
|
lineStart.y = aSrc.y;
|
||||||
lineEnd.y = aSrc.y + rectLen;
|
lineEnd.y = aSrc.y + srcSize.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust gradient stop positions for the new gradient line.
|
// Adjust gradient stop positions for the new gradient line.
|
||||||
|
Loading…
Reference in New Issue
Block a user