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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // overflow. | 306 // overflow. |
307 if (cell->RowSpan() == 1 && !cell->HasOverflowModel()) | 307 if (cell->RowSpan() == 1 && !cell->HasOverflowModel()) |
308 return; | 308 return; |
309 | 309 |
310 // The cell and the row share the section's coordinate system. However | 310 // The cell and the row share the section's coordinate system. However |
311 // the visual overflow should be determined in the coordinate system of | 311 // the visual overflow should be determined in the coordinate system of |
312 // the row, that's why we shift the rects by cell_row_offset below. | 312 // the row, that's why we shift the rects by cell_row_offset below. |
313 LayoutSize cell_row_offset = cell->Location() - Location(); | 313 LayoutSize cell_row_offset = cell->Location() - Location(); |
314 | 314 |
315 LayoutRect cell_visual_overflow_rect = | 315 LayoutRect cell_visual_overflow_rect = |
316 cell->VisualOverflowRectForPropagation(StyleRef()); | 316 cell->VisualOverflowRectForPropagation(); |
317 cell_visual_overflow_rect.Move(cell_row_offset); | 317 cell_visual_overflow_rect.Move(cell_row_offset); |
318 AddContentsVisualOverflow(cell_visual_overflow_rect); | 318 AddContentsVisualOverflow(cell_visual_overflow_rect); |
319 | 319 |
320 LayoutRect cell_layout_overflow_rect = | 320 LayoutRect cell_layout_overflow_rect = |
321 cell->LayoutOverflowRectForPropagation(StyleRef()); | 321 cell->LayoutOverflowRectForPropagation(); |
322 cell_layout_overflow_rect.Move(cell_row_offset); | 322 cell_layout_overflow_rect.Move(cell_row_offset); |
323 AddLayoutOverflow(cell_layout_overflow_rect); | 323 AddLayoutOverflow(cell_layout_overflow_rect); |
324 } | 324 } |
325 | 325 |
326 bool LayoutTableRow::IsFirstRowInSectionAfterHeader() const { | 326 bool LayoutTableRow::IsFirstRowInSectionAfterHeader() const { |
327 // If there isn't room on the page for at least one content row after the | 327 // If there isn't room on the page for at least one content row after the |
328 // header group, then we won't repeat the header on each page. | 328 // header group, then we won't repeat the header on each page. |
329 // https://drafts.csswg.org/css-tables-3/#repeated-headers reads like | 329 // https://drafts.csswg.org/css-tables-3/#repeated-headers reads like |
330 // it wants us to drop headers on only the pages that a single row | 330 // it wants us to drop headers on only the pages that a single row |
331 // won't fit but we avoid the complexity of that reading until it | 331 // won't fit but we avoid the complexity of that reading until it |
332 // is clarified. Tracked by crbug.com/675904 | 332 // is clarified. Tracked by crbug.com/675904 |
333 if (RowIndex()) | 333 if (RowIndex()) |
334 return false; | 334 return false; |
335 LayoutTableSection* header = Table()->Header(); | 335 LayoutTableSection* header = Table()->Header(); |
336 return header && Table()->SectionAbove(Section()) == header && | 336 return header && Table()->SectionAbove(Section()) == header && |
337 header->GetPaginationBreakability() != kAllowAnyBreaks; | 337 header->GetPaginationBreakability() != kAllowAnyBreaks; |
338 } | 338 } |
339 | 339 |
340 } // namespace blink | 340 } // namespace blink |
OLD | NEW |