| 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 14 matching lines...) Expand all Loading... |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/layout/LayoutTableRow.h" | 27 #include "core/layout/LayoutTableRow.h" |
| 28 | 28 |
| 29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
| 30 #include "core/fetch/ImageResource.h" | 30 #include "core/fetch/ImageResource.h" |
| 31 #include "core/layout/HitTestResult.h" | 31 #include "core/layout/HitTestResult.h" |
| 32 #include "core/layout/LayoutAnalyzer.h" | 32 #include "core/layout/LayoutAnalyzer.h" |
| 33 #include "core/layout/LayoutState.h" | 33 #include "core/layout/LayoutState.h" |
| 34 #include "core/layout/LayoutTableCell.h" | 34 #include "core/layout/LayoutTableCell.h" |
| 35 #include "core/layout/LayoutView.h" |
| 35 #include "core/layout/SubtreeLayoutScope.h" | 36 #include "core/layout/SubtreeLayoutScope.h" |
| 36 #include "core/paint/TableRowPainter.h" | 37 #include "core/paint/TableRowPainter.h" |
| 37 #include "core/style/StyleInheritedData.h" | 38 #include "core/style/StyleInheritedData.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 using namespace HTMLNames; | 42 using namespace HTMLNames; |
| 42 | 43 |
| 43 LayoutTableRow::LayoutTableRow(Element* element) | 44 LayoutTableRow::LayoutTableRow(Element* element) |
| 44 : LayoutTableBoxComponent(element), m_rowIndex(unsetRowIndex) { | 45 : LayoutTableBoxComponent(element), m_rowIndex(unsetRowIndex) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 183 } |
| 183 } | 184 } |
| 184 | 185 |
| 185 if (beforeChild || nextRow()) | 186 if (beforeChild || nextRow()) |
| 186 section()->setNeedsCellRecalc(); | 187 section()->setNeedsCellRecalc(); |
| 187 } | 188 } |
| 188 | 189 |
| 189 void LayoutTableRow::layout() { | 190 void LayoutTableRow::layout() { |
| 190 ASSERT(needsLayout()); | 191 ASSERT(needsLayout()); |
| 191 LayoutAnalyzer::Scope analyzer(*this); | 192 LayoutAnalyzer::Scope analyzer(*this); |
| 193 bool paginated = view()->layoutState()->isPaginated(); |
| 192 | 194 |
| 193 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { | 195 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) { |
| 194 SubtreeLayoutScope layouter(*cell); | 196 SubtreeLayoutScope layouter(*cell); |
| 195 cell->setLogicalTop(logicalTop()); | 197 cell->setLogicalTop(logicalTop()); |
| 196 if (!cell->needsLayout()) | 198 if (!cell->needsLayout()) |
| 197 section()->markChildForPaginationRelayoutIfNeeded(*cell, layouter); | 199 section()->markChildForPaginationRelayoutIfNeeded(*cell, layouter); |
| 198 if (cell->needsLayout()) | 200 if (cell->needsLayout()) |
| 199 cell->layout(); | 201 cell->layout(); |
| 202 if (paginated) |
| 203 section()->updateFragmentationInfoForChild(*cell); |
| 200 } | 204 } |
| 201 | 205 |
| 202 m_overflow.reset(); | 206 m_overflow.reset(); |
| 203 addVisualEffectOverflow(); | 207 addVisualEffectOverflow(); |
| 204 // We do not call addOverflowFromCell here. The cell are laid out to be | 208 // We do not call addOverflowFromCell here. The cell are laid out to be |
| 205 // measured above and will be sized correctly in a follow-up phase. | 209 // measured above and will be sized correctly in a follow-up phase. |
| 206 | 210 |
| 207 // We only ever need to issue paint invalidations if our cells didn't, which | 211 // We only ever need to issue paint invalidations if our cells didn't, which |
| 208 // means that they didn't need layout, so we know that our bounds didn't | 212 // means that they didn't need layout, so we know that our bounds didn't |
| 209 // change. This code is just making up for the fact that we did not invalidate | 213 // 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... |
| 303 // the visual overflow should be determined in the coordinate system of | 307 // the visual overflow should be determined in the coordinate system of |
| 304 // the row, that's why we shift it below. | 308 // the row, that's why we shift it below. |
| 305 LayoutUnit cellOffsetLogicalTopDifference = | 309 LayoutUnit cellOffsetLogicalTopDifference = |
| 306 cell->location().y() - location().y(); | 310 cell->location().y() - location().y(); |
| 307 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); | 311 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); |
| 308 | 312 |
| 309 addContentsVisualOverflow(cellVisualOverflowRect); | 313 addContentsVisualOverflow(cellVisualOverflowRect); |
| 310 } | 314 } |
| 311 | 315 |
| 312 } // namespace blink | 316 } // namespace blink |
| OLD | NEW |