Fix for bug #5680. Re-arranged some assertion checking code
git-svn-id: svn://10.0.0.236/trunk@29793 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1633,8 +1633,8 @@ void nsCSSRendering::PaintBorderEdges(nsIPresContext& aPresContext,
|
||||
// anchor point is the (x, y) location where the first tile should
|
||||
// be placed
|
||||
//
|
||||
// The anchor values are normalized wrt to the upper-left edge of the
|
||||
// bounds, and are always in the range:
|
||||
// For repeated tiling, the anchor values are normalized wrt to the upper-left
|
||||
// edge of the bounds, and are always in the range:
|
||||
// -(aTileWidth - 1) <= anchor.x <= 0
|
||||
// -(aTileHeight - 1) <= anchor.y <= 0
|
||||
//
|
||||
@@ -1675,6 +1675,8 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
|
||||
x %= aTileWidth;
|
||||
x = x - aTileWidth;
|
||||
}
|
||||
|
||||
NS_POSTCONDITION((x >= -(aTileWidth - 1)) && (x <= 0), "bad computed anchor value");
|
||||
}
|
||||
aResult.x = x;
|
||||
|
||||
@@ -1707,12 +1709,10 @@ ComputeBackgroundAnchorPoint(const nsStyleColor& aColor,
|
||||
y %= aTileHeight;
|
||||
y = y - aTileHeight;
|
||||
}
|
||||
|
||||
NS_POSTCONDITION((y >= -(aTileHeight - 1)) && (y <= 0), "bad computed anchor value");
|
||||
}
|
||||
aResult.y = y;
|
||||
|
||||
NS_POSTCONDITION((aResult.x >= -(aTileWidth - 1)) && (aResult.x <= 0) &&
|
||||
(aResult.y >= -(aTileHeight - 1)) && (aResult.y <= 0),
|
||||
"bad computed anchor value");
|
||||
}
|
||||
|
||||
// Returns the clip view associated with the scroll frame's scrolling
|
||||
|
||||
Reference in New Issue
Block a user