| 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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 10 * | 10 * |
| (...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 if (!cell || cs.inColSpan) | 1168 if (!cell || cs.inColSpan) |
| 1169 continue; | 1169 continue; |
| 1170 | 1170 |
| 1171 int rowIndex = cell->rowIndex(); | 1171 int rowIndex = cell->rowIndex(); |
| 1172 int rHeight = | 1172 int rHeight = |
| 1173 m_rowPos[rowIndex + cell->rowSpan()] - m_rowPos[rowIndex] - vspacing; | 1173 m_rowPos[rowIndex + cell->rowSpan()] - m_rowPos[rowIndex] - vspacing; |
| 1174 | 1174 |
| 1175 relayoutCellIfFlexed(*cell, r, rHeight); | 1175 relayoutCellIfFlexed(*cell, r, rHeight); |
| 1176 | 1176 |
| 1177 SubtreeLayoutScope layouter(*cell); | 1177 SubtreeLayoutScope layouter(*cell); |
| 1178 cell->computeIntrinsicPadding(rHeight, layouter); | 1178 LayoutUnit rowLogicalTop(m_rowPos[rowIndex]); |
| 1179 EVerticalAlign cellVerticalAlign; |
| 1180 // If the cell crosses a fragmentainer boundary, just align it at the |
| 1181 // top. That's how it was laid out initially, before we knew the final |
| 1182 // row height, and re-aligning it now could result in the cell being |
| 1183 // fragmented differently, which could change its height and thus violate |
| 1184 // the requested alignment. Give up instead of risking circular |
| 1185 // dependencies and unstable layout. |
| 1186 if (crossesPageBoundary(rowLogicalTop, LayoutUnit(rHeight))) |
| 1187 cellVerticalAlign = VerticalAlignTop; |
| 1188 else |
| 1189 cellVerticalAlign = cell->style()->verticalAlign(); |
| 1190 cell->computeIntrinsicPadding(rHeight, cellVerticalAlign, layouter); |
| 1179 | 1191 |
| 1180 LayoutRect oldCellRect = cell->frameRect(); | 1192 LayoutRect oldCellRect = cell->frameRect(); |
| 1181 | 1193 |
| 1182 setLogicalPositionForCell(cell, c); | 1194 setLogicalPositionForCell(cell, c); |
| 1183 | 1195 |
| 1184 if (!cell->needsLayout()) | 1196 if (!cell->needsLayout()) |
| 1185 markChildForPaginationRelayoutIfNeeded(*cell, layouter); | 1197 markChildForPaginationRelayoutIfNeeded(*cell, layouter); |
| 1186 | 1198 |
| 1187 cell->layoutIfNeeded(); | 1199 cell->layoutIfNeeded(); |
| 1188 | 1200 |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 // the header in all columns. | 2010 // the header in all columns. |
| 1999 // Note that this is in flow thread coordinates, not visual coordinates. The | 2011 // Note that this is in flow thread coordinates, not visual coordinates. The |
| 2000 // enclosing LayoutFlowThread will convert to visual coordinates. | 2012 // enclosing LayoutFlowThread will convert to visual coordinates. |
| 2001 if (table()->header() == this && isRepeatingHeaderGroup()) | 2013 if (table()->header() == this && isRepeatingHeaderGroup()) |
| 2002 rect.setHeight(table()->logicalHeight()); | 2014 rect.setHeight(table()->logicalHeight()); |
| 2003 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, | 2015 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, |
| 2004 flags); | 2016 flags); |
| 2005 } | 2017 } |
| 2006 | 2018 |
| 2007 } // namespace blink | 2019 } // namespace blink |
| OLD | NEW |