Index: third_party/WebKit/Source/core/paint/TableCellPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp |
index db01b6696654507dab384117324566a8fecbf5e7..6b08b269be5b3a1b4b0915f752a364defd00bcf4 100644 |
--- a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp |
@@ -105,11 +105,11 @@ void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const L |
if (!paintInfo.cullRect().intersectsCullRect(borderRect)) |
return; |
- GraphicsContext* graphicsContext = paintInfo.context; |
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), adjustedPaintOffset)) |
+ GraphicsContext& graphicsContext = paintInfo.context; |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), adjustedPaintOffset)) |
return; |
- LayoutObjectDrawingRecorder recorder(*graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), borderRect, adjustedPaintOffset); |
+ LayoutObjectDrawingRecorder recorder(graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), borderRect, adjustedPaintOffset); |
Color cellColor = m_layoutTableCell.resolveColor(CSSPropertyColor); |
// We never paint diagonals at the joins. We simply let the border with the highest |
@@ -153,9 +153,9 @@ void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co |
Optional<LayoutObjectDrawingRecorder> recorder; |
if (backgroundObject != &m_layoutTableCell) { |
LayoutPoint adjustedPaintOffset = paintRect.location(); |
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutTableCell, type, adjustedPaintOffset)) |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutTableCell, type, adjustedPaintOffset)) |
return; |
- recorder.emplace(*paintInfo.context, m_layoutTableCell, type, paintRect, adjustedPaintOffset); |
+ recorder.emplace(paintInfo.context, m_layoutTableCell, type, paintRect, adjustedPaintOffset); |
} else { |
ASSERT(paintRect.location() == paintOffset); |
} |
@@ -166,11 +166,11 @@ void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co |
// We have to clip here because the background would paint |
// on top of the borders otherwise. This only matters for cells and rows. |
bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == &m_layoutTableCell || backgroundObject == m_layoutTableCell.parent()) && tableElt->collapseBorders(); |
- GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip); |
+ GraphicsContextStateSaver stateSaver(paintInfo.context, shouldClip); |
if (shouldClip) { |
LayoutRect clipRect(paintRect.location(), m_layoutTableCell.size()); |
clipRect.expand(m_layoutTableCell.borderInsets()); |
- paintInfo.context->clip(pixelSnappedIntRect(clipRect)); |
+ paintInfo.context.clip(pixelSnappedIntRect(clipRect)); |
} |
BoxPainter(m_layoutTableCell).paintFillLayers(paintInfo, c, bgLayer, paintRect, BackgroundBleedNone, SkXfermode::kSrcOver_Mode, backgroundObject); |
} |
@@ -189,13 +189,13 @@ void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, |
if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().boxShadow() && !needsToPaintBorder) |
return; |
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, paintOffset)) |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, paintOffset)) |
return; |
LayoutRect visualOverflowRect = m_layoutTableCell.visualOverflowRect(); |
visualOverflowRect.moveBy(paintOffset); |
// TODO(chrishtr): the pixel-snapping here is likely incorrect. |
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect), paintOffset); |
+ LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect), paintOffset); |
LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent); |
@@ -221,11 +221,11 @@ void TableCellPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& |
if (!tableElt->collapseBorders() && m_layoutTableCell.style()->emptyCells() == HIDE && !m_layoutTableCell.firstChild()) |
return; |
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutTableCell, paintInfo.phase, paintOffset)) |
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutTableCell, paintInfo.phase, paintOffset)) |
return; |
LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent); |
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, paintInfo.phase, paintRect, paintOffset); |
+ LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableCell, paintInfo.phase, paintRect, paintOffset); |
BoxPainter(m_layoutTableCell).paintMaskImages(paintInfo, paintRect); |
} |