| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/TablePainter.h" | 6 #include "core/paint/TablePainter.h" |
| 7 | 7 |
| 8 #include "core/layout/LayoutTable.h" | 8 #include "core/layout/LayoutTable.h" |
| 9 #include "core/layout/LayoutTableSection.h" | 9 #include "core/layout/LayoutTableSection.h" |
| 10 #include "core/style/CollapsedBorderValue.h" | 10 #include "core/style/CollapsedBorderValue.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 LayoutRect rect(paintOffset, m_layoutTable.size()); | 81 LayoutRect rect(paintOffset, m_layoutTable.size()); |
| 82 m_layoutTable.subtractCaptionRect(rect); | 82 m_layoutTable.subtractCaptionRect(rect); |
| 83 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa
intOffset, rect); | 83 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa
intOffset, rect); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain
tOffset) | 86 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain
tOffset) |
| 87 { | 87 { |
| 88 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai
ntPhaseMask) | 88 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai
ntPhaseMask) |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte
xt, m_layoutTable, paintInfo.phase)) |
| 92 return; |
| 93 |
| 91 LayoutRect rect(paintOffset, m_layoutTable.size()); | 94 LayoutRect rect(paintOffset, m_layoutTable.size()); |
| 92 m_layoutTable.subtractCaptionRect(rect); | 95 m_layoutTable.subtractCaptionRect(rect); |
| 93 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain
tInfo.phase, pixelSnappedIntRect(rect)); | 96 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain
tInfo.phase, pixelSnappedIntRect(rect)); |
| 94 if (!recorder.canUseCachedDrawing()) | 97 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); |
| 95 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); | |
| 96 } | 98 } |
| 97 | 99 |
| 98 } // namespace blink | 100 } // namespace blink |
| OLD | NEW |