Chromium Code Reviews| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 if ((tw.isAuto() || tw.isPercent()) && !table->isOutOfFlowPositioned()) { | 191 if ((tw.isAuto() || tw.isPercent()) && !table->isOutOfFlowPositioned()) { |
| 192 RenderBlock* cb = table->containingBlock(); | 192 RenderBlock* cb = table->containingBlock(); |
| 193 while (cb && !cb->isRenderView() && !cb->isTableCell() && | 193 while (cb && !cb->isRenderView() && !cb->isTableCell() && |
| 194 cb->style()->width().isAuto() && !cb->isOutOfFlowPositioned()) | 194 cb->style()->width().isAuto() && !cb->isOutOfFlowPositioned()) |
| 195 cb = cb->containingBlock(); | 195 cb = cb->containingBlock(); |
| 196 | 196 |
| 197 table = 0; | 197 table = 0; |
| 198 if (cb && cb->isTableCell() && | 198 if (cb && cb->isTableCell() && |
| 199 (cb->style()->width().isAuto() || cb->style()->width().isPercent ())) { | 199 (cb->style()->width().isAuto() || cb->style()->width().isPercent ())) { |
| 200 RenderTableCell* cell = toRenderTableCell(cb); | 200 RenderTableCell* cell = toRenderTableCell(cb); |
| 201 if (cell->colSpan() > 1 || cell->table()->style()->width().isAut o()) | 201 Length tableWidth = cell->table()->style()->width(); |
| 202 if (cell->colSpan() > 1 || tableWidth.isAuto() || (tableWidth.is Specified() && tableWidth.isZero()) | |
| 203 || cell->table()->isFloatingOrOutOfFlowPositioned()) | |
|
Julien - ping for review
2013/05/29 20:56:14
How about some testing for these cases?
| |
| 202 scale = false; | 204 scale = false; |
| 203 else | 205 else |
| 204 table = cell->table(); | 206 table = cell->table(); |
| 205 } | 207 } |
| 206 } | 208 } |
| 207 else | 209 else |
| 208 table = 0; | 210 table = 0; |
| 209 } | 211 } |
| 210 return scale; | 212 return scale; |
| 211 } | 213 } |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 | 758 |
| 757 int pos = 0; | 759 int pos = 0; |
| 758 for (size_t i = 0; i < nEffCols; ++i) { | 760 for (size_t i = 0; i < nEffCols; ++i) { |
| 759 m_table->setColumnPosition(i, pos); | 761 m_table->setColumnPosition(i, pos); |
| 760 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); | 762 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); |
| 761 } | 763 } |
| 762 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); | 764 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); |
| 763 } | 765 } |
| 764 | 766 |
| 765 } | 767 } |
| OLD | NEW |