Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderTableSection.cpp

Issue 9738: Backport http://trac.webkit.org/changeset/36683 to the release ... (Closed) Base URL: svn://chrome-svn/chrome/branches/chrome_official_branch/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/data/layout_tests/chrome/fast/table/empty-row-crash.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | webkit/data/layout_tests/chrome/fast/table/empty-row-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698