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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 for (LayoutTableCell* cell = firstRow->firstCell(); cell; cell = cell->nextC
ell()) { | 139 for (LayoutTableCell* cell = firstRow->firstCell(); cell; cell = cell->nextC
ell()) { |
140 Length logicalWidth = cell->styleOrColLogicalWidth(); | 140 Length logicalWidth = cell->styleOrColLogicalWidth(); |
141 | 141 |
142 // FIXME: calc() on tables should be handled consistently with other len
gths. See bug: https://crbug.com/382725 | 142 // FIXME: calc() on tables should be handled consistently with other len
gths. See bug: https://crbug.com/382725 |
143 if (logicalWidth.isCalculated()) | 143 if (logicalWidth.isCalculated()) |
144 logicalWidth = Length(); // Make it Auto | 144 logicalWidth = Length(); // Make it Auto |
145 | 145 |
146 unsigned span = cell->colSpan(); | 146 unsigned span = cell->colSpan(); |
147 int fixedBorderBoxLogicalWidth = 0; | 147 int fixedBorderBoxLogicalWidth = 0; |
148 // FIXME: Support other length types. If the width is non-auto, it shoul
d probably just use | 148 // FIXME: Support other length types. If the width is non-auto, it shoul
d probably just use |
149 // RenderBox::computeLogicalWidthUsing to compute the width. | 149 // LayoutBox::computeLogicalWidthUsing to compute the width. |
150 if (logicalWidth.isFixed() && logicalWidth.isPositive()) { | 150 if (logicalWidth.isFixed() && logicalWidth.isPositive()) { |
151 fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBox
Sizing(logicalWidth.value()); | 151 fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBox
Sizing(logicalWidth.value()); |
152 logicalWidth.setValue(fixedBorderBoxLogicalWidth); | 152 logicalWidth.setValue(fixedBorderBoxLogicalWidth); |
153 } | 153 } |
154 | 154 |
155 unsigned usedSpan = 0; | 155 unsigned usedSpan = 0; |
156 while (usedSpan < span && currentColumn < nEffCols) { | 156 while (usedSpan < span && currentColumn < nEffCols) { |
157 float eSpan = m_table->spanOfEffCol(currentColumn); | 157 float eSpan = m_table->spanOfEffCol(currentColumn); |
158 // Only set if no col element has already set it. | 158 // Only set if no col element has already set it. |
159 if (m_width[currentColumn].isAuto() && logicalWidth.type() != Auto)
{ | 159 if (m_width[currentColumn].isAuto() && logicalWidth.type() != Auto)
{ |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 LayoutTableRow* row = section->rowRendererAt(i); | 328 LayoutTableRow* row = section->rowRendererAt(i); |
329 if (!row) | 329 if (!row) |
330 continue; | 330 continue; |
331 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->ne
xtCell()) | 331 for (LayoutTableCell* cell = row->firstCell(); cell; cell = cell->ne
xtCell()) |
332 cell->setPreferredLogicalWidthsDirty(); | 332 cell->setPreferredLogicalWidthsDirty(); |
333 } | 333 } |
334 } | 334 } |
335 } | 335 } |
336 | 336 |
337 } // namespace blink | 337 } // namespace blink |
OLD | NEW |