| 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, 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |