[project @ 2005-04-28 02:35:03 by rjw]

HTML border attributes have lower priority that CSS values (fix osnews). Disable tr height minimum value usage for now.

svn path=/import/netsurf/; revision=1694
This commit is contained in:
Richard Wilson 2005-04-28 02:35:03 +00:00
parent 7525f1dc31
commit 240f15b692
2 changed files with 27 additions and 18 deletions

View File

@ -941,15 +941,18 @@ void box_set_table_border(struct box *box, int value, colour color)
if (box->type == BOX_TABLE) {
for (unsigned int i = 0; i != 4; i++) {
box->style->border[i].color = color;
box->style->border[i].width.width =
CSS_BORDER_WIDTH_LENGTH;
box->style->border[i].width.value.value =
value;
box->style->border[i].width.value.unit =
CSS_UNIT_PX;
box->style->border[i].style =
CSS_BORDER_STYLE_OUTSET;
if (box->style->border[i].style ==
CSS_BORDER_STYLE_NOT_SET) {
box->style->border[i].color = color;
box->style->border[i].width.width =
CSS_BORDER_WIDTH_LENGTH;
box->style->border[i].width.value.value =
value;
box->style->border[i].width.value.unit =
CSS_UNIT_PX;
box->style->border[i].style =
CSS_BORDER_STYLE_OUTSET;
}
}
}
@ -963,15 +966,18 @@ void box_set_table_border(struct box *box, int value, colour color)
break;
case BOX_TABLE_CELL:
for (unsigned int i = 0; i != 4; i++) {
child->style->border[i].color = color;
child->style->border[i].width.width =
CSS_BORDER_WIDTH_LENGTH;
child->style->border[i].width.value.value =
1;
child->style->border[i].width.value.unit =
CSS_UNIT_PX;
child->style->border[i].style =
CSS_BORDER_STYLE_INSET;
if (child->style->border[i].style ==
CSS_BORDER_STYLE_NOT_SET) {
child->style->border[i].color = color;
child->style->border[i].width.width =
CSS_BORDER_WIDTH_LENGTH;
child->style->border[i].width.value.value =
1;
child->style->border[i].width.value.unit =
CSS_UNIT_PX;
child->style->border[i].style =
CSS_BORDER_STYLE_INSET;
}
}
break;
default:

View File

@ -1488,6 +1488,9 @@ bool layout_table(struct box *table, int available_width,
* possible, so treat it as a minimum */
int row_height = (int) css_len2px(&row->style->
height.length, row->style);
/* we can't use this value currently as it is always
* the height of a line of text in the current style */
row_height = 0;
for (c = row->children; c; c = c->next) {
assert(c->style);
c->width = xs[c->start_column + c->columns] -