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

Side by Side Diff: Source/WebCore/rendering/RenderTableSection.cpp

Issue 9271032: Revert 105795 - Merge 105685 - Crash in WebCore::RenderTableSection::rowLogicalHeightChanged (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 11 months 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
« no previous file with comments | « LayoutTests/fast/table/crash-section-logical-height-changed-needsCellRecalc-expected.txt ('k') | no next file » | 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, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 RenderTableCell* tableCell = toRenderTableCell(cell); 1148 RenderTableCell* tableCell = toRenderTableCell(cell);
1149 addCell(tableCell, tableRow); 1149 addCell(tableCell, tableRow);
1150 } 1150 }
1151 } 1151 }
1152 } 1152 }
1153 1153
1154 m_grid.shrinkToFit(); 1154 m_grid.shrinkToFit();
1155 setNeedsLayout(true); 1155 setNeedsLayout(true);
1156 } 1156 }
1157 1157
1158 // FIXME: This function could be made O(1) in certain cases (like for the non-mo st-constrainive cells' case).
1159 void RenderTableSection::rowLogicalHeightChanged(unsigned rowIndex)
1160 {
1161 if (needsCellRecalc())
1162 return;
1163
1164 setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(m_grid[rowIndex]);
1165
1166 for (RenderObject* cell = m_grid[rowIndex].rowRenderer->firstChild(); cell; cell = cell->nextSibling()) {
1167 if (!cell->isTableCell())
1168 continue;
1169
1170 updateLogicalHeightForCell(m_grid[rowIndex], toRenderTableCell(cell));
1171 }
1172 }
1173
1174 void RenderTableSection::setNeedsCellRecalc() 1158 void RenderTableSection::setNeedsCellRecalc()
1175 { 1159 {
1176 m_needsCellRecalc = true; 1160 m_needsCellRecalc = true;
1177 if (RenderTable* t = table()) 1161 if (RenderTable* t = table())
1178 t->setNeedsSectionRecalc(); 1162 t->setNeedsSectionRecalc();
1179 } 1163 }
1180 1164
1181 unsigned RenderTableSection::numColumns() const 1165 unsigned RenderTableSection::numColumns() const
1182 { 1166 {
1183 unsigned result = 0; 1167 unsigned result = 0;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point InContainer, cellPoint, action)) { 1280 if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, point InContainer, cellPoint, action)) {
1297 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi nt)); 1281 updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoi nt));
1298 return true; 1282 return true;
1299 } 1283 }
1300 } 1284 }
1301 return false; 1285 return false;
1302 1286
1303 } 1287 }
1304 1288
1305 } // namespace WebCore 1289 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/crash-section-logical-height-changed-needsCellRecalc-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698