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

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: Support for fixed table layouts, test update and comments 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 eec5a0cd9f63a4fdf8ed79387308db06ee725ad3..55adabfa7760129d8e4dd1557cd303197ada5530 100644
--- a/Source/core/rendering/AutoTableLayout.cpp
+++ b/Source/core/rendering/AutoTableLayout.cpp
@@ -87,6 +87,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
Julien - ping for review 2014/06/23 17:09:24 For consistency, we should capitalize Make.
if (cellLogicalWidth.value() > cCellMaxWidth)
cellLogicalWidth.setValue(cCellMaxWidth);
if (cellLogicalWidth.isNegative())
@@ -293,7 +296,8 @@ int AutoTableLayout::calcEffectiveLogicalWidth()
unsigned span = cell->colSpan();
Length cellLogicalWidth = cell->styleOrColLogicalWidth();
- if (cellLogicalWidth.isZero())
+ // 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
Julien - ping for review 2014/06/23 17:09:23 Ditto.
unsigned effCol = m_table->colToEffCol(cell->col());

Powered by Google App Engine
This is Rietveld 408576698