Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/CollapsedBorderPainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/CollapsedBorderPainter.cpp b/third_party/WebKit/Source/core/paint/CollapsedBorderPainter.cpp |
| index 86cbedac467d3876e45a4e55a82a2083a7c78ad3..ab88f536c7fc268f3651dd1f77ada5b6830bbdd3 100644 |
| --- a/third_party/WebKit/Source/core/paint/CollapsedBorderPainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/CollapsedBorderPainter.cpp |
| @@ -86,13 +86,19 @@ void CollapsedBorderPainter::SetupBorders() { |
| // Skip painting the before border if it will be painted by the above cell |
| // as its after border. If we break page before the row with non-zero strut |
| - // (which means a gap between this row and the row above), we need to paint |
| - // the before border separately. |
| + // (which means a gap between this row and the row above), or if we are |
| + // painting the top row of a footer that repeats on each page we need to paint |
| + // the before border separately. This will double-paint the top border of the |
|
mstensho (USE GERRIT)
2017/07/17 10:38:08
That double-painting doesn't seem like a good thin
rhogan
2017/07/24 18:56:07
Will do. wangxianzhu would be ideal but he's off f
mstensho (USE GERRIT)
2017/07/25 08:59:32
OK. A TODO, then.
|
| + // footer on the last page. |
| if (before_.value && !cell_.Row()->PaginationStrut()) { |
| const auto* cell_above = table_.CellAbove(cell_); |
| + bool cell_is_top_of_repeating_footer = |
|
mstensho (USE GERRIT)
2017/07/17 10:38:08
Sounds like a rare case, and a lot of other condit
rhogan
2017/07/24 18:56:07
Done.
|
| + cell_.Section()->IsRepeatingFooterGroup() && |
| + (!cell_above || cell_above->Section() != cell_.Section()); |
| if (cell_.StartsAtSameColumn(cell_above) && |
| cell_above->ColSpan() >= cell_.ColSpan() && |
| - cell_above->Row()->HasSameDirectionAs(&table_)) { |
| + cell_above->Row()->HasSameDirectionAs(&table_) && |
| + !cell_is_top_of_repeating_footer) { |
| before_.value = nullptr; |
| // Otherwise we'll still paint the shared border twice which may cause |
| // incorrect border conflict resolution for row/col spanning cells. |