| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (itemToPaint == PaintCollapsedBorders) | 88 if (itemToPaint == PaintCollapsedBorders) |
| 89 paintCollapsedSectionBorders(paintInfo, nestedOffset, currentBorderValue); | 89 paintCollapsedSectionBorders(paintInfo, nestedOffset, currentBorderValue); |
| 90 else | 90 else |
| 91 paintSection(paintInfo, nestedOffset); | 91 paintSection(paintInfo, nestedOffset); |
| 92 paginationOffset.move(0, pageHeight.toInt()); | 92 paginationOffset.move(0, pageHeight.toInt()); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 void TableSectionPainter::paint(const PaintInfo& paintInfo, | 96 void TableSectionPainter::paint(const PaintInfo& paintInfo, |
| 97 const LayoutPoint& paintOffset) { | 97 const LayoutPoint& paintOffset) { |
| 98 ObjectPainter(m_layoutTableSection).checkPaintOffset(paintInfo, paintOffset); |
| 98 paintSection(paintInfo, paintOffset); | 99 paintSection(paintInfo, paintOffset); |
| 99 LayoutTable* table = m_layoutTableSection.table(); | 100 LayoutTable* table = m_layoutTableSection.table(); |
| 100 if (table->header() == m_layoutTableSection) | 101 if (table->header() == m_layoutTableSection) |
| 101 paintRepeatingHeaderGroup(paintInfo, paintOffset, CollapsedBorderValue(), | 102 paintRepeatingHeaderGroup(paintInfo, paintOffset, CollapsedBorderValue(), |
| 102 PaintSection); | 103 PaintSection); |
| 103 } | 104 } |
| 104 | 105 |
| 105 void TableSectionPainter::paintSection(const PaintInfo& paintInfo, | 106 void TableSectionPainter::paintSection(const PaintInfo& paintInfo, |
| 106 const LayoutPoint& paintOffset) { | 107 const LayoutPoint& paintOffset) { |
| 107 DCHECK(!m_layoutTableSection.needsLayout()); | 108 DCHECK(!m_layoutTableSection.needsLayout()); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 LayoutRect bounds = BoxPainter(m_layoutTableSection) | 399 LayoutRect bounds = BoxPainter(m_layoutTableSection) |
| 399 .boundsForDrawingRecorder(paintInfo, paintOffset); | 400 .boundsForDrawingRecorder(paintInfo, paintOffset); |
| 400 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableSection, | 401 LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableSection, |
| 401 type, bounds); | 402 type, bounds); |
| 402 BoxPainter::paintBoxShadow( | 403 BoxPainter::paintBoxShadow( |
| 403 paintInfo, LayoutRect(paintOffset, m_layoutTableSection.size()), | 404 paintInfo, LayoutRect(paintOffset, m_layoutTableSection.size()), |
| 404 m_layoutTableSection.styleRef(), shadowStyle); | 405 m_layoutTableSection.styleRef(), shadowStyle); |
| 405 } | 406 } |
| 406 | 407 |
| 407 } // namespace blink | 408 } // namespace blink |
| OLD | NEW |