Index: Source/core/rendering/AutoTableLayout.cpp |
diff --git a/Source/core/rendering/AutoTableLayout.cpp b/Source/core/rendering/AutoTableLayout.cpp |
index 31d26bf0e35075f7d76b6119316214f4793182bf..bbabe4c39461fdf8ff36429cb77ac223dde3dfa6 100644 |
--- a/Source/core/rendering/AutoTableLayout.cpp |
+++ b/Source/core/rendering/AutoTableLayout.cpp |
@@ -85,6 +85,9 @@ void AutoTableLayout::recalcColumn(unsigned effCol) |
// FIXME: Other browsers have a lower limit for the cell's max width. |
const int cCellMaxWidth = 32760; |
Length cellLogicalWidth = cell->styleOrColLogicalWidth(); |
+ // FIXME: calc() on tables should be handled consistently with other lengths. See bug: https://crbug.com/382725 |
+ if (cellLogicalWidth.isCalculated()) |
+ cellLogicalWidth = Length(); // Make it Auto |
if (cellLogicalWidth.value() > cCellMaxWidth) |
cellLogicalWidth.setValue(cCellMaxWidth); |
if (cellLogicalWidth.isNegative()) |
@@ -291,8 +294,9 @@ int AutoTableLayout::calcEffectiveLogicalWidth() |
unsigned span = cell->colSpan(); |
Length cellLogicalWidth = cell->styleOrColLogicalWidth(); |
- if (cellLogicalWidth.isZero()) |
- cellLogicalWidth = Length(); // make it Auto |
+ // FIXME: calc() on tables should be handled consistently with other lengths. See bug: https://crbug.com/382725 |
+ if (cellLogicalWidth.isZero() || cellLogicalWidth.isCalculated()) |
+ cellLogicalWidth = Length(); // Make it Auto |
unsigned effCol = m_table->colToEffCol(cell->col()); |
size_t lastCol = effCol; |