| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
| 3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
| 4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
| 5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 { | 163 { |
| 164 int nRows = m_gridRows; | 164 int nRows = m_gridRows; |
| 165 if (numRows > nRows) { | 165 if (numRows > nRows) { |
| 166 if (numRows > static_cast<int>(m_grid.size())) { | 166 if (numRows > static_cast<int>(m_grid.size())) { |
| 167 size_t maxSize = numeric_limits<size_t>::max() / sizeof(RowStruct); | 167 size_t maxSize = numeric_limits<size_t>::max() / sizeof(RowStruct); |
| 168 if (static_cast<size_t>(numRows) > maxSize) | 168 if (static_cast<size_t>(numRows) > maxSize) |
| 169 return false; | 169 return false; |
| 170 m_grid.grow(numRows); | 170 m_grid.grow(numRows); |
| 171 } | 171 } |
| 172 m_gridRows = numRows; | 172 m_gridRows = numRows; |
| 173 int nCols = table()->numEffCols(); | 173 int nCols = max(1, table()->numEffCols()); |
| 174 CellStruct emptyCellStruct; | 174 CellStruct emptyCellStruct; |
| 175 emptyCellStruct.cell = 0; | 175 emptyCellStruct.cell = 0; |
| 176 emptyCellStruct.inColSpan = false; | 176 emptyCellStruct.inColSpan = false; |
| 177 for (int r = nRows; r < numRows; r++) { | 177 for (int r = nRows; r < numRows; r++) { |
| 178 m_grid[r].row = new Row(nCols); | 178 m_grid[r].row = new Row(nCols); |
| 179 m_grid[r].row->fill(emptyCellStruct); | 179 m_grid[r].row->fill(emptyCellStruct); |
| 180 m_grid[r].rowRenderer = 0; | 180 m_grid[r].rowRenderer = 0; |
| 181 m_grid[r].baseline = 0; | 181 m_grid[r].baseline = 0; |
| 182 m_grid[r].height = Length(); | 182 m_grid[r].height = Length(); |
| 183 } | 183 } |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 else | 1088 else |
| 1089 *stream << cellAt(r, c).cell << "null cell "; | 1089 *stream << cellAt(r, c).cell << "null cell "; |
| 1090 } | 1090 } |
| 1091 *stream << endl << ind; | 1091 *stream << endl << ind; |
| 1092 } | 1092 } |
| 1093 RenderContainer::dump(stream,ind); | 1093 RenderContainer::dump(stream,ind); |
| 1094 } | 1094 } |
| 1095 #endif | 1095 #endif |
| 1096 | 1096 |
| 1097 } // namespace WebCore | 1097 } // namespace WebCore |
| OLD | NEW |