Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1126)

Unified Diff: Source/core/paint/TableCellPainter.cpp

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/TableCellPainter.cpp
diff --git a/Source/core/paint/TableCellPainter.cpp b/Source/core/paint/TableCellPainter.cpp
index 33a05f3b6dfe22449bbc06a0ae33b8b02456b6c9..f340509f252fd41c4e1410d2c9d260c42a7ed142 100644
--- a/Source/core/paint/TableCellPainter.cpp
+++ b/Source/core/paint/TableCellPainter.cpp
@@ -115,7 +115,7 @@ void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const L
if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType)))
return;
- LayoutObjectDrawingRecorder recorder(*graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), borderRect);
+ LayoutObjectDrawingRecorder recorder(*graphicsContext, m_layoutTableCell, static_cast<DisplayItem::Type>(displayItemType), FloatRect(borderRect));
jbroman 2015/08/26 21:45:09 ditto
chrishtr 2015/08/26 22:32:21 Done
Color cellColor = m_layoutTableCell.resolveColor(CSSPropertyColor);
bool antialias = BoxPainter::shouldAntialiasLines(graphicsContext);
@@ -167,7 +167,8 @@ void TableCellPainter::paintBackgroundsBehindCell(const PaintInfo& paintInfo, co
if (shouldClip) {
LayoutRect clipRect(paintRect.location(), m_layoutTableCell.size());
clipRect.expand(m_layoutTableCell.borderInsets());
- paintInfo.context->clip(clipRect);
+ // TODO(chrishtr): should this be pixel-snapped?
+ paintInfo.context->clip(FloatRect(clipRect));
}
BoxPainter(m_layoutTableCell).paintFillLayers(paintInfo, c, bgLayer, paintRect, BackgroundBleedNone, SkXfermode::kSrcOver_Mode, backgroundObject);
}
@@ -191,7 +192,8 @@ void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo,
LayoutRect visualOverflowRect = m_layoutTableCell.visualOverflowRect();
visualOverflowRect.moveBy(paintOffset);
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect));
+ // TODO(chrishtr): the pixel-snapping here is likely incorrect.
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, FloatRect(pixelSnappedIntRect(visualOverflowRect)));
jbroman 2015/08/26 21:45:09 ditto
chrishtr 2015/08/26 22:32:21 Done
LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent);

Powered by Google App Engine
This is Rietveld 408576698