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 | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 |
8 * Apple Inc. | 8 * Apple Inc. |
9 * All rights reserved. | 9 * All rights reserved. |
10 * | 10 * |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Table rows do not add translation. | 193 // Table rows do not add translation. |
194 LayoutState state(*this, LayoutSize()); | 194 LayoutState state(*this, LayoutSize()); |
195 | 195 |
196 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 196 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { |
197 SubtreeLayoutScope layouter(*cell); | 197 SubtreeLayoutScope layouter(*cell); |
198 cell->setLogicalTop(logicalTop()); | 198 cell->setLogicalTop(logicalTop()); |
199 if (!cell->needsLayout()) | 199 if (!cell->needsLayout()) |
200 markChildForPaginationRelayoutIfNeeded(*cell, layouter); | 200 markChildForPaginationRelayoutIfNeeded(*cell, layouter); |
201 if (cell->needsLayout()) | 201 if (cell->needsLayout()) |
202 cell->layout(); | 202 cell->layout(); |
203 // We're laying out each cell here to establish its raw logical height so it | |
204 // can be used to figure out the row's height and baseline later on in | |
205 // layoutRows(). As part of that we will layout the cell again if we're in a | |
206 // paginated context and come up with the correct strut. Any strut we come | |
207 // up with here will depend on the old paged layout and will give the cell | |
208 // an invalid height that is not useful for figuring out the raw height of | |
209 // the row. | |
210 if (cell->firstRootBox() && cell->firstRootBox()->paginationStrut()) | |
211 cell->setLogicalHeight(cell->logicalHeight() - | |
212 cell->firstRootBox()->paginationStrut()); | |
213 } | 203 } |
214 | 204 |
215 m_overflow.reset(); | 205 m_overflow.reset(); |
216 addVisualEffectOverflow(); | 206 addVisualEffectOverflow(); |
217 // We do not call addOverflowFromCell here. The cell are laid out to be | 207 // We do not call addOverflowFromCell here. The cell are laid out to be |
218 // measured above and will be sized correctly in a follow-up phase. | 208 // measured above and will be sized correctly in a follow-up phase. |
219 | 209 |
220 // We only ever need to issue paint invalidations if our cells didn't, which | 210 // We only ever need to issue paint invalidations if our cells didn't, which |
221 // means that they didn't need layout, so we know that our bounds didn't | 211 // means that they didn't need layout, so we know that our bounds didn't |
222 // change. This code is just making up for the fact that we did not invalidate | 212 // change. This code is just making up for the fact that we did not invalidate |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // the visual overflow should be determined in the coordinate system of | 306 // the visual overflow should be determined in the coordinate system of |
317 // the row, that's why we shift it below. | 307 // the row, that's why we shift it below. |
318 LayoutUnit cellOffsetLogicalTopDifference = | 308 LayoutUnit cellOffsetLogicalTopDifference = |
319 cell->location().y() - location().y(); | 309 cell->location().y() - location().y(); |
320 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 310 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
321 | 311 |
322 addContentsVisualOverflow(cellVisualOverflowRect); | 312 addContentsVisualOverflow(cellVisualOverflowRect); |
323 } | 313 } |
324 | 314 |
325 } // namespace blink | 315 } // namespace blink |
OLD | NEW |