Fix another case of bad border-radius corners (and document a third that's not fixed). (Bug 500141) r=roc a2.0=blocking
This commit is contained in:
@@ -420,9 +420,12 @@ typedef enum {
|
||||
SIDE_CLIP_RECTANGLE
|
||||
} SideClipType;
|
||||
|
||||
// Given three points, p0, p1, and midPoint, move p1 to the point
|
||||
// nearest the midpoint, while maintaing the slope of the line. p0 and
|
||||
// p1 must be distinct.
|
||||
// Given three points, p0, p1, and midPoint, move p1 further in to the
|
||||
// rectangle (of which aMidPoint is the center) so that it reaches the
|
||||
// closer of the horizontal or vertical lines intersecting the midpoint,
|
||||
// while maintaing the slope of the line. p0 and p1 must be distinct.
|
||||
// FIXME: Extending only to the midpoint isn't actually sufficient for
|
||||
// boxes with asymmetric radii.
|
||||
static void
|
||||
MaybeMoveToMidPoint(gfxPoint& aP0, gfxPoint& aP1, const gfxPoint& aMidPoint)
|
||||
{
|
||||
@@ -439,7 +442,7 @@ MaybeMoveToMidPoint(gfxPoint& aP0, gfxPoint& aP1, const gfxPoint& aMidPoint)
|
||||
aP1.x = aMidPoint.x;
|
||||
} else {
|
||||
gfxFloat k = NS_MIN((aMidPoint.x - aP0.x) / ps.x,
|
||||
(aMidPoint.y - aP1.y) / ps.y);
|
||||
(aMidPoint.y - aP0.y) / ps.y);
|
||||
aP1 = aP0 + ps * k;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user