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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 repaint(); | 229 repaint(); |
230 | 230 |
231 setLogicalWidth(tableLayoutLogicalWidth); | 231 setLogicalWidth(tableLayoutLogicalWidth); |
232 setCellWidthChanged(true); | 232 setCellWidthChanged(true); |
233 } | 233 } |
234 | 234 |
235 void RenderTableCell::layout() | 235 void RenderTableCell::layout() |
236 { | 236 { |
237 ASSERT(needsLayout()); | 237 ASSERT(needsLayout()); |
238 | 238 |
| 239 setMayNeedInvalidation(true); |
239 updateFirstLetter(); | 240 updateFirstLetter(); |
240 | 241 |
241 int oldCellBaseline = cellBaselinePosition(); | 242 int oldCellBaseline = cellBaselinePosition(); |
242 layoutBlock(cellWidthChanged()); | 243 layoutBlock(cellWidthChanged()); |
243 | 244 |
244 // 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 | 245 // 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 |
245 // 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 | 246 // 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 |
246 // 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 | 247 // 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 |
247 // table and row layout can use the correct baseline and height for this cel
l. | 248 // table and row layout can use the correct baseline and height for this cel
l. |
248 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin
ePosition() > section()->rowBaseline(rowIndex())) { | 249 if (isBaselineAligned() && section()->rowBaseline(rowIndex()) && cellBaselin
ePosition() > section()->rowBaseline(rowIndex())) { |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 | 1274 |
1274 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) | 1275 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render
Object* parent) |
1275 { | 1276 { |
1276 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); | 1277 RenderTableCell* newCell = RenderTableCell::createAnonymous(&parent->documen
t()); |
1277 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); | 1278 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(
parent->style(), TABLE_CELL); |
1278 newCell->setStyle(newStyle.release()); | 1279 newCell->setStyle(newStyle.release()); |
1279 return newCell; | 1280 return newCell; |
1280 } | 1281 } |
1281 | 1282 |
1282 } // namespace WebCore | 1283 } // namespace WebCore |
OLD | NEW |