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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 void LayoutTableRow::layout() { | 189 void LayoutTableRow::layout() { |
190 ASSERT(needsLayout()); | 190 ASSERT(needsLayout()); |
191 LayoutAnalyzer::Scope analyzer(*this); | 191 LayoutAnalyzer::Scope analyzer(*this); |
192 | 192 |
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 if (!cell->needsLayout()) | 199 if (!cell->needsLayout()) |
199 markChildForPaginationRelayoutIfNeeded(*cell, layouter); | 200 markChildForPaginationRelayoutIfNeeded(*cell, layouter); |
200 if (cell->needsLayout()) | 201 if (cell->needsLayout()) |
201 cell->layout(); | 202 cell->layout(); |
202 // We're laying out each cell here to establish its raw logical height so it | 203 // We're laying out each cell here to establish its raw logical height so it |
203 // can be used to figure out the row's height and baseline later on in | 204 // can be used to figure out the row's height and baseline later on in |
204 // layoutRows(). As part of that we will layout the cell again if we're in a | 205 // layoutRows(). As part of that we will layout the cell again if we're in a |
205 // paginated context and come up with the correct strut. Any strut we come | 206 // paginated context and come up with the correct strut. Any strut we come |
206 // up with here will depend on the old paged layout and will give the cell | 207 // up with here will depend on the old paged layout and will give the cell |
207 // an invalid height that is not useful for figuring out the raw height of | 208 // an invalid height that is not useful for figuring out the raw height of |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // the visual overflow should be determined in the coordinate system of | 303 // the visual overflow should be determined in the coordinate system of |
303 // the row, that's why we shift it below. | 304 // the row, that's why we shift it below. |
304 LayoutUnit cellOffsetLogicalTopDifference = | 305 LayoutUnit cellOffsetLogicalTopDifference = |
305 cell->location().y() - location().y(); | 306 cell->location().y() - location().y(); |
306 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 307 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
307 | 308 |
308 addContentsVisualOverflow(cellVisualOverflowRect); | 309 addContentsVisualOverflow(cellVisualOverflowRect); |
309 } | 310 } |
310 | 311 |
311 } // namespace blink | 312 } // namespace blink |
OLD | NEW |