Reviewed by aroben
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleOrColWidth):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16315
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-09-11 David Hyatt <hyatt@apple.com>
+
+ Fix for bug 8126, column widths apply to the border boxes of cells.
+
+ Reviewed by aroben
+
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::styleOrColWidth):
+
2006-09-11 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Adele.
if (colSpan() > 1 || !w.isAuto())
return w;
RenderTableCol* col = table()->colElement(_col);
- if (col)
+ if (col) {
w = col->style()->width();
+
+ // Column widths specified on <col> apply to the border box of the cell.
+ // Percentages don't need to be handled since they're always treated this way (even when specified on the cells).
+ // See Bugzilla bug 8126 for details.
+ if (w.isFixed() && w.value() > 0)
+ w = Length(max(0, w.value() - borderLeft() - borderRight() - paddingLeft() - paddingRight()), Fixed);
+ }
return w;
}