| 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/paint/BoxClipper.h" | 10 #include "core/paint/BoxClipper.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 return; | 33 return; |
| 34 | 34 |
| 35 // We don't paint our own background, but we do let the kids paint their bac
kgrounds. | 35 // We don't paint our own background, but we do let the kids paint their bac
kgrounds. |
| 36 if (paintPhase == PaintPhaseChildBlockBackgrounds) | 36 if (paintPhase == PaintPhaseChildBlockBackgrounds) |
| 37 paintPhase = PaintPhaseChildBlockBackground; | 37 paintPhase = PaintPhaseChildBlockBackground; |
| 38 | 38 |
| 39 PaintInfo info(paintInfo); | 39 PaintInfo info(paintInfo); |
| 40 info.phase = paintPhase; | 40 info.phase = paintPhase; |
| 41 info.updatePaintingRootForChildren(&m_layoutTable); | 41 info.updatePaintingRootForChildren(&m_layoutTable); |
| 42 | 42 |
| 43 for (RenderObject* child = m_layoutTable.firstChild(); child; child = child-
>nextSibling()) { | 43 for (LayoutObject* child = m_layoutTable.firstChild(); child; child = child-
>nextSibling()) { |
| 44 if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (ch
ild->isTableSection() || child->isTableCaption())) { | 44 if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (ch
ild->isTableSection() || child->isTableCaption())) { |
| 45 LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild(to
RenderBox(child), paintOffset); | 45 LayoutPoint childPoint = m_layoutTable.flipForWritingModeForChild(to
RenderBox(child), paintOffset); |
| 46 child->paint(info, childPoint); | 46 child->paint(info, childPoint); |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 if (m_layoutTable.collapseBorders() && paintPhase == PaintPhaseChildBlockBac
kground && m_layoutTable.style()->visibility() == VISIBLE) { | 50 if (m_layoutTable.collapseBorders() && paintPhase == PaintPhaseChildBlockBac
kground && m_layoutTable.style()->visibility() == VISIBLE) { |
| 51 m_layoutTable.recalcCollapsedBorders(); | 51 m_layoutTable.recalcCollapsedBorders(); |
| 52 // Using our cached sorted styles, we then do individual passes, | 52 // Using our cached sorted styles, we then do individual passes, |
| 53 // painting each style of border from lowest precedence to highest prece
dence. | 53 // painting each style of border from lowest precedence to highest prece
dence. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return; | 86 return; |
| 87 | 87 |
| 88 LayoutRect rect(paintOffset, m_layoutTable.size()); | 88 LayoutRect rect(paintOffset, m_layoutTable.size()); |
| 89 m_layoutTable.subtractCaptionRect(rect); | 89 m_layoutTable.subtractCaptionRect(rect); |
| 90 RenderDrawingRecorder recorder(paintInfo.context, m_layoutTable, paintInfo.p
hase, pixelSnappedIntRect(rect)); | 90 RenderDrawingRecorder recorder(paintInfo.context, m_layoutTable, paintInfo.p
hase, pixelSnappedIntRect(rect)); |
| 91 if (!recorder.canUseCachedDrawing()) | 91 if (!recorder.canUseCachedDrawing()) |
| 92 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); | 92 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| OLD | NEW |