| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } else if (child->isTableSection()) { | 58 } else if (child->isTableSection()) { |
| 59 RenderTableSection* section = toRenderTableSection(child); | 59 RenderTableSection* section = toRenderTableSection(child); |
| 60 unsigned numRows = section->numRows(); | 60 unsigned numRows = section->numRows(); |
| 61 for (unsigned i = 0; i < numRows; i++) { | 61 for (unsigned i = 0; i < numRows; i++) { |
| 62 RenderTableSection::CellStruct current = section->cellAt(i, effC
ol); | 62 RenderTableSection::CellStruct current = section->cellAt(i, effC
ol); |
| 63 RenderTableCell* cell = current.primaryCell(); | 63 RenderTableCell* cell = current.primaryCell(); |
| 64 | 64 |
| 65 if (current.inColSpan || !cell) | 65 if (current.inColSpan || !cell) |
| 66 continue; | 66 continue; |
| 67 | 67 |
| 68 bool cellHasContent = cell->children()->firstChild() || cell->st
yle()->hasBorder() || cell->style()->hasPadding(); | 68 bool cellHasContent = cell->children()->firstChild() || cell->st
yle()->hasBorder() || cell->style()->hasPadding() || cell->style()->hasBackgroun
d(); |
| 69 if (cellHasContent) | 69 if (cellHasContent) |
| 70 columnLayout.emptyCellsOnly = false; | 70 columnLayout.emptyCellsOnly = false; |
| 71 | 71 |
| 72 // A cell originates in this column. Ensure we have | 72 // A cell originates in this column. Ensure we have |
| 73 // a min/max width of at least 1px for this column now. | 73 // a min/max width of at least 1px for this column now. |
| 74 columnLayout.minLogicalWidth = max<int>(columnLayout.minLogicalW
idth, cellHasContent ? 1 : 0); | 74 columnLayout.minLogicalWidth = max<int>(columnLayout.minLogicalW
idth, cellHasContent ? 1 : 0); |
| 75 columnLayout.maxLogicalWidth = max<int>(columnLayout.maxLogicalW
idth, 1); | 75 columnLayout.maxLogicalWidth = max<int>(columnLayout.maxLogicalW
idth, 1); |
| 76 | 76 |
| 77 if (cell->colSpan() == 1) { | 77 if (cell->colSpan() == 1) { |
| 78 columnLayout.minLogicalWidth = max<int>(cell->minPreferredLo
gicalWidth(), columnLayout.minLogicalWidth); | 78 columnLayout.minLogicalWidth = max<int>(cell->minPreferredLo
gicalWidth(), columnLayout.minLogicalWidth); |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 709 |
| 710 int pos = 0; | 710 int pos = 0; |
| 711 for (size_t i = 0; i < nEffCols; ++i) { | 711 for (size_t i = 0; i < nEffCols; ++i) { |
| 712 m_table->setColumnPosition(i, pos); | 712 m_table->setColumnPosition(i, pos); |
| 713 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing(
); | 713 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing(
); |
| 714 } | 714 } |
| 715 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); | 715 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); |
| 716 } | 716 } |
| 717 | 717 |
| 718 } | 718 } |
| OLD | NEW |