Skip to content
Permalink
Browse files
Fix for bug 8126, column widths apply to the border boxes of cells.
        Reviewed by aroben

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::styleOrColWidth):



Canonical link: https://commits.webkit.org/13683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt committed Sep 12, 2006
1 parent ffffe1f commit 8f974aa23024c2f8c75dbe52d86bc3bdd7c8e898
Showing 2 changed files with 17 additions and 1 deletion.
@@ -1,3 +1,12 @@
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.
@@ -80,8 +80,15 @@ Length RenderTableCell::styleOrColWidth()
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;
}

0 comments on commit 8f974aa

Please sign in to comment.