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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 LayoutRect rect(paintOffset, m_layoutTable.size()); | 77 LayoutRect rect(paintOffset, m_layoutTable.size()); |
78 m_layoutTable.subtractCaptionRect(rect); | 78 m_layoutTable.subtractCaptionRect(rect); |
79 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa
intOffset, rect); | 79 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa
intOffset, rect); |
80 } | 80 } |
81 | 81 |
82 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain
tOffset) | 82 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain
tOffset) |
83 { | 83 { |
84 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai
ntPhaseMask) | 84 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai
ntPhaseMask) |
85 return; | 85 return; |
86 | 86 |
87 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte
xt, m_layoutTable, paintInfo.phase)) | 87 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte
xt, m_layoutTable, paintInfo.phase, paintOffset)) |
88 return; | 88 return; |
89 | 89 |
90 LayoutRect rect(paintOffset, m_layoutTable.size()); | 90 LayoutRect rect(paintOffset, m_layoutTable.size()); |
91 m_layoutTable.subtractCaptionRect(rect); | 91 m_layoutTable.subtractCaptionRect(rect); |
| 92 |
92 // TODO(chrishtr): the pixel-snapping here is likely wrong. | 93 // TODO(chrishtr): the pixel-snapping here is likely wrong. |
93 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain
tInfo.phase, rect); | 94 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain
tInfo.phase, rect, paintOffset); |
94 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); | 95 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); |
95 } | 96 } |
96 | 97 |
97 } // namespace blink | 98 } // namespace blink |
OLD | NEW |