OLD | NEW |
---|---|
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, 2006, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved. |
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 } | 286 } |
287 | 287 |
288 for (size_t i = 0; i < m_spanCells.size(); ++i) { | 288 for (size_t i = 0; i < m_spanCells.size(); ++i) { |
289 RenderTableCell* cell = m_spanCells[i]; | 289 RenderTableCell* cell = m_spanCells[i]; |
290 if (!cell) | 290 if (!cell) |
291 break; | 291 break; |
292 | 292 |
293 unsigned span = cell->colSpan(); | 293 unsigned span = cell->colSpan(); |
294 | 294 |
295 Length cellLogicalWidth = cell->styleOrColLogicalWidth(); | 295 Length cellLogicalWidth = cell->styleOrColLogicalWidth(); |
296 if (cellLogicalWidth.isZero()) | 296 if (cellLogicalWidth.isZero() || cellLogicalWidth.isCalculated()) |
Julien - ping for review
2014/06/09 23:23:03
The specification intentionally allows 'auto' in t
| |
297 cellLogicalWidth = Length(); // make it Auto | 297 cellLogicalWidth = Length(); // make it Auto |
298 | 298 |
299 unsigned effCol = m_table->colToEffCol(cell->col()); | 299 unsigned effCol = m_table->colToEffCol(cell->col()); |
300 size_t lastCol = effCol; | 300 size_t lastCol = effCol; |
301 int cellMinLogicalWidth = cell->minPreferredLogicalWidth() + spacingInRo wDirection; | 301 int cellMinLogicalWidth = cell->minPreferredLogicalWidth() + spacingInRo wDirection; |
302 int cellMaxLogicalWidth = cell->maxPreferredLogicalWidth() + spacingInRo wDirection; | 302 int cellMaxLogicalWidth = cell->maxPreferredLogicalWidth() + spacingInRo wDirection; |
303 float totalPercent = 0; | 303 float totalPercent = 0; |
304 int spanMinLogicalWidth = 0; | 304 int spanMinLogicalWidth = 0; |
305 int spanMaxLogicalWidth = 0; | 305 int spanMaxLogicalWidth = 0; |
306 bool allColsArePercent = true; | 306 bool allColsArePercent = true; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
726 | 726 |
727 int pos = 0; | 727 int pos = 0; |
728 for (size_t i = 0; i < nEffCols; ++i) { | 728 for (size_t i = 0; i < nEffCols; ++i) { |
729 m_table->setColumnPosition(i, pos); | 729 m_table->setColumnPosition(i, pos); |
730 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); | 730 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); |
731 } | 731 } |
732 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); | 732 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); |
733 } | 733 } |
734 | 734 |
735 } | 735 } |
OLD | NEW |