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 30 matching lines...) Expand all Loading... |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 void LayoutTableAlgorithmAuto::recalcColumn(unsigned effCol) | 44 void LayoutTableAlgorithmAuto::recalcColumn(unsigned effCol) |
45 { | 45 { |
46 Layout& columnLayout = m_layoutStruct[effCol]; | 46 Layout& columnLayout = m_layoutStruct[effCol]; |
47 | 47 |
48 LayoutTableCell* fixedContributor = 0; | 48 LayoutTableCell* fixedContributor = 0; |
49 LayoutTableCell* maxContributor = 0; | 49 LayoutTableCell* maxContributor = 0; |
50 | 50 |
51 for (RenderObject* child = m_table->children()->firstChild(); child; child =
child->nextSibling()) { | 51 for (LayoutObject* child = m_table->children()->firstChild(); child; child =
child->nextSibling()) { |
52 if (child->isLayoutTableCol()) { | 52 if (child->isLayoutTableCol()) { |
53 // LayoutTableCols don't have the concept of preferred logical width
, but we need to clear their dirty bits | 53 // LayoutTableCols don't have the concept of preferred logical width
, but we need to clear their dirty bits |
54 // so that if we call setPreferredWidthsDirty(true) on a col or one
of its descendants, we'll mark it's | 54 // so that if we call setPreferredWidthsDirty(true) on a col or one
of its descendants, we'll mark it's |
55 // ancestors as dirty. | 55 // ancestors as dirty. |
56 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits(); | 56 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits(); |
57 } else if (child->isTableSection()) { | 57 } else if (child->isTableSection()) { |
58 LayoutTableSection* section = toLayoutTableSection(child); | 58 LayoutTableSection* section = toLayoutTableSection(child); |
59 unsigned numRows = section->numRows(); | 59 unsigned numRows = section->numRows(); |
60 for (unsigned i = 0; i < numRows; i++) { | 60 for (unsigned i = 0; i < numRows; i++) { |
61 LayoutTableSection::CellStruct current = section->cellAt(i, effC
ol); | 61 LayoutTableSection::CellStruct current = section->cellAt(i, effC
ol); |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 | 730 |
731 int pos = 0; | 731 int pos = 0; |
732 for (size_t i = 0; i < nEffCols; ++i) { | 732 for (size_t i = 0; i < nEffCols; ++i) { |
733 m_table->setColumnPosition(i, pos); | 733 m_table->setColumnPosition(i, pos); |
734 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing(
); | 734 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing(
); |
735 } | 735 } |
736 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); | 736 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); |
737 } | 737 } |
738 | 738 |
739 } | 739 } |
OLD | NEW |