Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/TableSectionPainter.h" | 5 #include "core/paint/TableSectionPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutTableCell.h" | 7 #include "core/layout/LayoutTableCell.h" |
| 8 #include "core/layout/LayoutTableCol.h" | 8 #include "core/layout/LayoutTableCol.h" |
| 9 #include "core/layout/LayoutTableRow.h" | 9 #include "core/layout/LayoutTableRow.h" |
| 10 #include "core/paint/BoxClipper.h" | 10 #include "core/paint/BoxClipper.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 pageHeight - intMod(headerGroupOffset, pageHeight); | 62 pageHeight - intMod(headerGroupOffset, pageHeight); |
| 63 paginationOffset.move(LayoutUnit(), offsetToNextPage); | 63 paginationOffset.move(LayoutUnit(), offsetToNextPage); |
| 64 // Now move paginationOffset to the top of the page the cull rect starts on. | 64 // Now move paginationOffset to the top of the page the cull rect starts on. |
| 65 if (paintInfo.cullRect().m_rect.y() > paginationOffset.y()) { | 65 if (paintInfo.cullRect().m_rect.y() > paginationOffset.y()) { |
| 66 paginationOffset.move(LayoutUnit(), pageHeight * | 66 paginationOffset.move(LayoutUnit(), pageHeight * |
| 67 ((paintInfo.cullRect().m_rect.y() - | 67 ((paintInfo.cullRect().m_rect.y() - |
| 68 paginationOffset.y()) / | 68 paginationOffset.y()) / |
| 69 pageHeight) | 69 pageHeight) |
| 70 .toInt()); | 70 .toInt()); |
| 71 } | 71 } |
| 72 LayoutUnit bottomBound = | 72 LayoutUnit bottomBound = std::min( |
| 73 std::min(LayoutUnit(paintInfo.cullRect().m_rect.maxY()), | 73 LayoutUnit(paintInfo.cullRect().m_rect.maxY()), |
| 74 paintOffset.y() + table->logicalHeight()); | 74 paintOffset.y() + (table->logicalHeight() - table->vBorderSpacing())); |
|
mstensho (USE GERRIT)
2016/11/01 20:41:32
What if it's only bottom captions that exceed the
| |
| 75 paginationOffset.move(LayoutUnit(), -m_layoutTableSection.logicalTop()); | 75 paginationOffset.move(LayoutUnit(), -m_layoutTableSection.logicalTop()); |
| 76 while (paginationOffset.y() < bottomBound) { | 76 while (paginationOffset.y() < bottomBound) { |
| 77 LayoutPoint nestedOffset = | 77 LayoutPoint nestedOffset = |
| 78 paginationOffset + | 78 paginationOffset + |
| 79 LayoutPoint(LayoutUnit(), | 79 LayoutPoint(LayoutUnit(), |
| 80 m_layoutTableSection.offsetForRepeatingHeader()); | 80 m_layoutTableSection.offsetForRepeatingHeader()); |
| 81 if (itemToPaint == PaintCollapsedBorders) | 81 if (itemToPaint == PaintCollapsedBorders) |
| 82 paintCollapsedSectionBorders(paintInfo, nestedOffset, currentBorderValue); | 82 paintCollapsedSectionBorders(paintInfo, nestedOffset, currentBorderValue); |
| 83 else | 83 else |
| 84 paintSection(paintInfo, nestedOffset); | 84 paintSection(paintInfo, nestedOffset); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 LayoutRect bounds = BoxPainter(m_layoutTableSection) | 393 LayoutRect bounds = BoxPainter(m_layoutTableSection) |
| 394 .boundsForDrawingRecorder(paintInfo, paintOffset); | 394 .boundsForDrawingRecorder(paintInfo, paintOffset); |
| 395 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableSection, | 395 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableSection, |
| 396 type, bounds); | 396 type, bounds); |
| 397 BoxPainter::paintBoxShadow( | 397 BoxPainter::paintBoxShadow( |
| 398 paintInfo, LayoutRect(paintOffset, m_layoutTableSection.size()), | 398 paintInfo, LayoutRect(paintOffset, m_layoutTableSection.size()), |
| 399 m_layoutTableSection.styleRef(), shadowStyle); | 399 m_layoutTableSection.styleRef(), shadowStyle); |
| 400 } | 400 } |
| 401 | 401 |
| 402 } // namespace blink | 402 } // namespace blink |
| OLD | NEW |