Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1368)

Unified Diff: Source/core/rendering/AutoTableLayout.cpp

Issue 192603003: ASSERTION FAILED: type() == Percent in WebCore::Length::percent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@extractedstyle
Patch Set: Test update Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « LayoutTests/fast/css/handling-calc-on-table-as-auto-expected.txt ('k') | Source/core/rendering/FixedTableLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698