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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 if (child->isLayoutTableCol()) { | 48 if (child->isLayoutTableCol()) { |
49 // LayoutTableCols don't have the concept of preferred logical width, but | 49 // LayoutTableCols don't have the concept of preferred logical width, but |
50 // we need to clear their dirty bits so that if we call | 50 // we need to clear their dirty bits so that if we call |
51 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll | 51 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll |
52 // mark it's ancestors as dirty. | 52 // mark it's ancestors as dirty. |
53 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits(); | 53 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits(); |
54 } else if (child->isTableSection()) { | 54 } else if (child->isTableSection()) { |
55 LayoutTableSection* section = toLayoutTableSection(child); | 55 LayoutTableSection* section = toLayoutTableSection(child); |
56 unsigned numRows = section->numRows(); | 56 unsigned numRows = section->numRows(); |
57 for (unsigned i = 0; i < numRows; i++) { | 57 for (unsigned i = 0; i < numRows; i++) { |
| 58 if (effCol >= section->numCols(i)) |
| 59 continue; |
58 LayoutTableSection::CellStruct current = section->cellAt(i, effCol); | 60 LayoutTableSection::CellStruct current = section->cellAt(i, effCol); |
59 LayoutTableCell* cell = current.primaryCell(); | 61 LayoutTableCell* cell = current.primaryCell(); |
60 | 62 |
61 if (current.inColSpan || !cell) | 63 if (current.inColSpan || !cell) |
62 continue; | 64 continue; |
63 columnLayout.columnHasNoCells = false; | 65 columnLayout.columnHasNoCells = false; |
64 | 66 |
65 if (cell->maxPreferredLogicalWidth()) | 67 if (cell->maxPreferredLogicalWidth()) |
66 columnLayout.emptyCellsOnly = false; | 68 columnLayout.emptyCellsOnly = false; |
67 | 69 |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 int reduce = available * minMaxDiff / logicalWidthBeyondMin; | 853 int reduce = available * minMaxDiff / logicalWidthBeyondMin; |
852 m_layoutStruct[i].computedLogicalWidth += reduce; | 854 m_layoutStruct[i].computedLogicalWidth += reduce; |
853 available -= reduce; | 855 available -= reduce; |
854 logicalWidthBeyondMin -= minMaxDiff; | 856 logicalWidthBeyondMin -= minMaxDiff; |
855 if (available >= 0) | 857 if (available >= 0) |
856 break; | 858 break; |
857 } | 859 } |
858 } | 860 } |
859 } | 861 } |
860 } // namespace blink | 862 } // namespace blink |
OLD | NEW |