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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. |
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1128 | 1128 |
1129 ASSERT(!needsLayout()); | 1129 ASSERT(!needsLayout()); |
1130 | 1130 |
1131 setLogicalHeight(LayoutUnit(m_rowPos[totalRows])); | 1131 setLogicalHeight(LayoutUnit(m_rowPos[totalRows])); |
1132 | 1132 |
1133 computeOverflowFromCells(totalRows, nEffCols); | 1133 computeOverflowFromCells(totalRows, nEffCols); |
1134 } | 1134 } |
1135 | 1135 |
1136 int LayoutTableSection::paginationStrutForRow(LayoutTableRow* row, LayoutUnit lo gicalOffset) const | 1136 int LayoutTableSection::paginationStrutForRow(LayoutTableRow* row, LayoutUnit lo gicalOffset) const |
1137 { | 1137 { |
1138 if (!row) | |
mstensho (USE GERRIT)
2016/08/12 08:36:59
Why would you ever want to pass a null pointer? Be
rhogan
2016/08/12 18:39:48
Sure - updated.
| |
1139 return 0; | |
1138 // Even if the row allows us to break-inside, we will want to put a strut on the row if we have a header | 1140 // Even if the row allows us to break-inside, we will want to put a strut on the row if we have a header |
1139 // group that wants to appear at the top of each page. | 1141 // group that wants to appear at the top of each page. |
1140 bool tableHeaderForcesStrut = table()->header() ? table()->header()->getPagi nationBreakability() != AllowAnyBreaks : false; | 1142 bool tableHeaderForcesStrut = table()->header() ? table()->header()->getPagi nationBreakability() != AllowAnyBreaks : false; |
1141 if (row->getPaginationBreakability() == AllowAnyBreaks && !tableHeaderForces Strut) | 1143 if (row->getPaginationBreakability() == AllowAnyBreaks && !tableHeaderForces Strut) |
1142 return 0; | 1144 return 0; |
1143 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); | 1145 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); |
1144 if (!pageLogicalHeight) | 1146 if (!pageLogicalHeight) |
1145 return 0; | 1147 return 0; |
1146 // If the row is too tall for the page don't insert a strut. | 1148 // If the row is too tall for the page don't insert a strut. |
1147 LayoutUnit rowLogicalHeight = row->logicalHeight(); | 1149 LayoutUnit rowLogicalHeight = row->logicalHeight(); |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1745 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, | 1747 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, |
1746 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. | 1748 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. |
1747 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. | 1749 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. |
1748 if (table()->header() == this && hasRepeatingHeaderGroup()) | 1750 if (table()->header() == this && hasRepeatingHeaderGroup()) |
1749 rect.setHeight(table()->logicalHeight()); | 1751 rect.setHeight(table()->logicalHeight()); |
1750 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); | 1752 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); |
1751 } | 1753 } |
1752 | 1754 |
1753 | 1755 |
1754 } // namespace blink | 1756 } // namespace blink |
OLD | NEW |