Fix for bug #10563 where we were triggering a post condition assertion. Changed

ComputeBackgroundAnchorPoint() to correctly calculate tile offset that is a
multiple of the tile


git-svn-id: svn://10.0.0.236/trunk@41286 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 1999-07-27 14:13:09 +00:00
parent 2ecb34d8f6
commit 177b8110fa
2 changed files with 12 additions and 4 deletions

View File

@ -1674,7 +1674,9 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
}
else if (x != 0) {
x %= aTileWidth;
x = x - aTileWidth;
if (x > 0) {
x = x - aTileWidth;
}
}
NS_POSTCONDITION((x >= -(aTileWidth - 1)) && (x <= 0), "bad computed anchor value");
@ -1708,7 +1710,9 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
}
else if (y != 0) {
y %= aTileHeight;
y = y - aTileHeight;
if (y > 0) {
y = y - aTileHeight;
}
}
NS_POSTCONDITION((y >= -(aTileHeight - 1)) && (y <= 0), "bad computed anchor value");

View File

@ -1674,7 +1674,9 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
}
else if (x != 0) {
x %= aTileWidth;
x = x - aTileWidth;
if (x > 0) {
x = x - aTileWidth;
}
}
NS_POSTCONDITION((x >= -(aTileWidth - 1)) && (x <= 0), "bad computed anchor value");
@ -1708,7 +1710,9 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
}
else if (y != 0) {
y %= aTileHeight;
y = y - aTileHeight;
if (y > 0) {
y = y - aTileHeight;
}
}
NS_POSTCONDITION((y >= -(aTileHeight - 1)) && (y <= 0), "bad computed anchor value");