| 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, 2010, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 // Table rows do not add translation. | 170 // Table rows do not add translation. |
| 171 LayoutState state(*this, LayoutSize()); | 171 LayoutState state(*this, LayoutSize()); |
| 172 | 172 |
| 173 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 173 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { |
| 174 SubtreeLayoutScope layouter(*cell); | 174 SubtreeLayoutScope layouter(*cell); |
| 175 if (!cell->needsLayout()) | 175 if (!cell->needsLayout()) |
| 176 cell->markForPaginationRelayoutIfNeeded(layouter); | 176 cell->markForPaginationRelayoutIfNeeded(layouter); |
| 177 if (cell->needsLayout()) | 177 if (cell->needsLayout()) |
| 178 cell->layout(); | 178 cell->layout(); |
| 179 // We're laying out each cell here to establish its raw logical height s
o it can be used to |
| 180 // figure out the row's height and baseline later on in layoutRows(). As
part of that we |
| 181 // will layout the cell again if we're in a paginated context and come u
p with the |
| 182 // correct strut. Any strut we come up with here will depend on the old
paged layout and will |
| 183 // give the cell an invalid height that is not useful for figuring out t
he raw height of the row. |
| 184 if (cell->firstRootBox() && cell->firstRootBox()->paginationStrut()) |
| 185 cell->setLogicalHeight(cell->logicalHeight() - cell->firstRootBox()-
>paginationStrut()); |
| 179 } | 186 } |
| 180 | 187 |
| 181 m_overflow.reset(); | 188 m_overflow.reset(); |
| 182 addVisualEffectOverflow(); | 189 addVisualEffectOverflow(); |
| 183 // We do not call addOverflowFromCell here. The cell are laid out to be | 190 // We do not call addOverflowFromCell here. The cell are laid out to be |
| 184 // measured above and will be sized correctly in a follow-up phase. | 191 // measured above and will be sized correctly in a follow-up phase. |
| 185 | 192 |
| 186 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need | 193 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need |
| 187 // layout, so we know that our bounds didn't change. This code is just makin
g up for | 194 // layout, so we know that our bounds didn't change. This code is just makin
g up for |
| 188 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. | 195 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // The cell and the row share the section's coordinate system. However | 267 // The cell and the row share the section's coordinate system. However |
| 261 // the visual overflow should be determined in the coordinate system of | 268 // the visual overflow should be determined in the coordinate system of |
| 262 // the row, that's why we shift it below. | 269 // the row, that's why we shift it below. |
| 263 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); | 270 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
| 264 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 271 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
| 265 | 272 |
| 266 addContentsVisualOverflow(cellVisualOverflowRect); | 273 addContentsVisualOverflow(cellVisualOverflowRect); |
| 267 } | 274 } |
| 268 | 275 |
| 269 } // namespace blink | 276 } // namespace blink |
| OLD | NEW |