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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 ASSERT(needsLayout()); | 160 ASSERT(needsLayout()); |
161 LayoutAnalyzer::Scope analyzer(*this); | 161 LayoutAnalyzer::Scope analyzer(*this); |
162 | 162 |
163 // Table rows do not add translation. | 163 // Table rows do not add translation. |
164 LayoutState state(*this, LayoutSize()); | 164 LayoutState state(*this, LayoutSize()); |
165 | 165 |
166 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 166 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { |
167 SubtreeLayoutScope layouter(*cell); | 167 SubtreeLayoutScope layouter(*cell); |
168 if (!cell->needsLayout()) | 168 if (!cell->needsLayout()) |
169 cell->markForPaginationRelayoutIfNeeded(layouter); | 169 cell->markForPaginationRelayoutIfNeeded(layouter); |
170 if (cell->needsLayout()) { | 170 if (cell->needsLayout()) |
171 cell->computeAndSetBlockDirectionMargins(table()); | |
172 cell->layout(); | 171 cell->layout(); |
173 } | |
174 } | 172 } |
175 | 173 |
176 m_overflow.clear(); | 174 m_overflow.clear(); |
177 addVisualEffectOverflow(); | 175 addVisualEffectOverflow(); |
178 // We do not call addOverflowFromCell here. The cell are laid out to be | 176 // We do not call addOverflowFromCell here. The cell are laid out to be |
179 // measured above and will be sized correctly in a follow-up phase. | 177 // measured above and will be sized correctly in a follow-up phase. |
180 | 178 |
181 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need | 179 // We only ever need to issue paint invalidations if our cells didn't, which
means that they didn't need |
182 // layout, so we know that our bounds didn't change. This code is just makin
g up for | 180 // layout, so we know that our bounds didn't change. This code is just makin
g up for |
183 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. | 181 // the fact that we did not invalidate paints in setStyle() because we had a
layout hint. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // The cell and the row share the section's coordinate system. However | 250 // The cell and the row share the section's coordinate system. However |
253 // the visual overflow should be determined in the coordinate system of | 251 // the visual overflow should be determined in the coordinate system of |
254 // the row, that's why we shift it below. | 252 // the row, that's why we shift it below. |
255 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); | 253 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location(
).y(); |
256 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); | 254 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); |
257 | 255 |
258 addVisualOverflow(cellVisualOverflowRect); | 256 addVisualOverflow(cellVisualOverflowRect); |
259 } | 257 } |
260 | 258 |
261 } // namespace blink | 259 } // namespace blink |
OLD | NEW |