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

Side by Side Diff: Source/core/rendering/FixedTableLayout.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org)
3 * (C) 2002 Dirk Mueller (mueller@kde.org) 3 * (C) 2002 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License. 9 * version 2 of the License.
10 * 10 *
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Iterate over the first row in case some are unspecified. 133 // Iterate over the first row in case some are unspecified.
134 RenderTableSection* section = m_table->topNonEmptySection(); 134 RenderTableSection* section = m_table->topNonEmptySection();
135 if (!section) 135 if (!section)
136 return usedWidth; 136 return usedWidth;
137 137
138 unsigned currentColumn = 0; 138 unsigned currentColumn = 0;
139 139
140 RenderTableRow* firstRow = section->firstRow(); 140 RenderTableRow* firstRow = section->firstRow();
141 for (RenderTableCell* cell = firstRow->firstCell(); cell; cell = cell->nextC ell()) { 141 for (RenderTableCell* cell = firstRow->firstCell(); cell; cell = cell->nextC ell()) {
142 Length logicalWidth = cell->styleOrColLogicalWidth(); 142 Length logicalWidth = cell->styleOrColLogicalWidth();
143
144 // FIXME: calc() on tables should be handled consistently with other len gths. See bug: https://crbug.com/382725
145 if (logicalWidth.isCalculated())
146 logicalWidth = Length(); // Make it Auto
147
143 unsigned span = cell->colSpan(); 148 unsigned span = cell->colSpan();
144 int fixedBorderBoxLogicalWidth = 0; 149 int fixedBorderBoxLogicalWidth = 0;
145 // FIXME: Support other length types. If the width is non-auto, it shoul d probably just use 150 // FIXME: Support other length types. If the width is non-auto, it shoul d probably just use
146 // RenderBox::computeLogicalWidthUsing to compute the width. 151 // RenderBox::computeLogicalWidthUsing to compute the width.
147 if (logicalWidth.isFixed() && logicalWidth.isPositive()) { 152 if (logicalWidth.isFixed() && logicalWidth.isPositive()) {
148 fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBox Sizing(logicalWidth.value()); 153 fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBox Sizing(logicalWidth.value());
149 logicalWidth.setValue(fixedBorderBoxLogicalWidth); 154 logicalWidth.setValue(fixedBorderBoxLogicalWidth);
150 } 155 }
151 156
152 unsigned usedSpan = 0; 157 unsigned usedSpan = 0;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 RenderTableRow* row = section->rowRendererAt(i); 330 RenderTableRow* row = section->rowRendererAt(i);
326 if (!row) 331 if (!row)
327 continue; 332 continue;
328 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->ne xtCell()) 333 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->ne xtCell())
329 cell->setPreferredLogicalWidthsDirty(); 334 cell->setPreferredLogicalWidthsDirty();
330 } 335 }
331 } 336 }
332 } 337 }
333 338
334 } // namespace WebCore 339 } // namespace WebCore
OLDNEW
« Source/core/rendering/AutoTableLayout.cpp ('K') | « Source/core/rendering/AutoTableLayout.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698