| 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, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 repaint(); | 219 repaint(); |
| 220 | 220 |
| 221 setLogicalWidth(tableLayoutLogicalWidth); | 221 setLogicalWidth(tableLayoutLogicalWidth); |
| 222 setCellWidthChanged(true); | 222 setCellWidthChanged(true); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void RenderTableCell::layout() | 225 void RenderTableCell::layout() |
| 226 { | 226 { |
| 227 ASSERT(needsLayout()); | 227 ASSERT(needsLayout()); |
| 228 | 228 |
| 229 StackStats::LayoutCheckPoint layoutCheckPoint; | |
| 230 updateFirstLetter(); | 229 updateFirstLetter(); |
| 231 | 230 |
| 232 int oldCellBaseline = cellBaselinePosition(); | 231 int oldCellBaseline = cellBaselinePosition(); |
| 233 layoutBlock(cellWidthChanged()); | 232 layoutBlock(cellWidthChanged()); |
| 234 | 233 |
| 235 // If we have replaced content, the intrinsic height of our content may have
changed since the last time we laid out. If that's the case the intrinsic paddi
ng we used | 234 // If we have replaced content, the intrinsic height of our content may have
changed since the last time we laid out. If that's the case the intrinsic paddi
ng we used |
| 236 // for layout (the padding required to push the contents of the cell down to
the row's baseline) is included in our new height and baseline and makes both | 235 // for layout (the padding required to push the contents of the cell down to
the row's baseline) is included in our new height and baseline and makes both |
| 237 // of them wrong. So if our content's intrinsic height has changed push the
new content up into the intrinsic padding and relayout so that the rest of | 236 // of them wrong. So if our content's intrinsic height has changed push the
new content up into the intrinsic padding and relayout so that the rest of |
| 238 // table and row layout can use the correct baseline and height for this cel
l. | 237 // table and row layout can use the correct baseline and height for this cel
l. |
| 239 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin
ePosition() > section()->rowBaseline(rowIndex())) { | 238 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin
ePosition() > section()->rowBaseline(rowIndex())) { |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 | 1260 |
| 1262 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) | 1261 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) |
| 1263 { | 1262 { |
| 1264 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document
()); | 1263 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document
()); |
| 1265 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); | 1264 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); |
| 1266 newCell->setStyle(newStyle.release()); | 1265 newCell->setStyle(newStyle.release()); |
| 1267 return newCell; | 1266 return newCell; |
| 1268 } | 1267 } |
| 1269 | 1268 |
| 1270 } // namespace WebCore | 1269 } // namespace WebCore |
| OLD | NEW |