svn path=/trunk/netsurf/; revision=5919
This commit is contained in:
François Revel 2008-12-21 21:28:12 +00:00
parent 6a4d4489f5
commit fe355fc087

View File

@ -911,6 +911,8 @@ bool html_redraw_borders(struct box *box, int x_parent, int y_parent,
int right = box->border[RIGHT];
int bottom = box->border[BOTTOM];
int left = box->border[LEFT];
int x, y;
unsigned int i;
if (scale != 1.0) {
top *= scale;
@ -921,9 +923,10 @@ bool html_redraw_borders(struct box *box, int x_parent, int y_parent,
assert(box->style);
int x = (x_parent + box->x) * scale;
int y = (y_parent + box->y) * scale;
x = (x_parent + box->x) * scale;
y = (y_parent + box->y) * scale;
{
/* calculate border vertices */
int p[20] = {
x, y,
@ -938,7 +941,6 @@ bool html_redraw_borders(struct box *box, int x_parent, int y_parent,
x - left, y - top
};
unsigned int i;
for (i = 0; i != 4; i++) {
if (box->border[i] == 0)
continue;
@ -948,6 +950,7 @@ bool html_redraw_borders(struct box *box, int x_parent, int y_parent,
box->border[i] * scale))
return false;
}
}
return true;
}
@ -984,6 +987,7 @@ bool html_redraw_inline_borders(struct box *box, int x0, int y0, int x1, int y1,
assert(box->style);
{
/* calculate border vertices */
int p[20] = {
x0 + left, y0 + top,
@ -1018,6 +1022,7 @@ bool html_redraw_inline_borders(struct box *box, int x0, int y0, int x1, int y1,
box->style->border[RIGHT].color,
box->style->border[RIGHT].style, right))
return false;
}
return true;
}