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

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

Issue 1178553002: Use visual overflow rect as cull rect for table-cell box-decorations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TableCellPainter.cpp
diff --git a/Source/core/paint/TableCellPainter.cpp b/Source/core/paint/TableCellPainter.cpp
index 98ddaa79237fe6b7ff46da230481b656e5a09dda..3fec84449513ac3a0a2912a48f821bc3597ea8e6 100644
--- a/Source/core/paint/TableCellPainter.cpp
+++ b/Source/core/paint/TableCellPainter.cpp
@@ -180,11 +180,14 @@ void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo,
if (!m_layoutTableCell.hasBackground() && !m_layoutTableCell.styleRef().boxShadow() && !needsToPaintBorder)
return;
- LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent);
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(paintRect));
+ LayoutRect visualOverflowRect = m_layoutTableCell.visualOverflowRect();
+ visualOverflowRect.moveBy(paintOffset);
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTableCell, DisplayItem::BoxDecorationBackground, pixelSnappedIntRect(visualOverflowRect));
if (recorder.canUseCachedDrawing())
return;
+ LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent);
+
BoxPainter::paintBoxShadow(paintInfo, paintRect, m_layoutTableCell.styleRef(), Normal);
// Paint our cell background.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698