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

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

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 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: 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 5aa8690c86e2ab485719db7e6841a0c2a67c1d19..a1d1105e90e109d08f185cfe7d013948c179fe1a 100644
--- a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
@@ -177,34 +177,20 @@ void TableCellPainter::paintCollapsedBorders(
void TableCellPainter::paintContainerBackgroundBehindCell(
const PaintInfo& paintInfo,
const LayoutPoint& paintOffset,
- const LayoutObject& backgroundObject,
- DisplayItem::Type type) {
+ const LayoutObject& backgroundObject) {
DCHECK(backgroundObject != m_layoutTableCell);
if (m_layoutTableCell.style()->visibility() != EVisibility::kVisible)
return;
- LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableCell.location();
- if (!BlockPainter(m_layoutTableCell)
- .intersectsPaintRect(paintInfo, adjustedPaintOffset))
- return;
-
LayoutTable* table = m_layoutTableCell.table();
if (!table->collapseBorders() &&
m_layoutTableCell.style()->emptyCells() == EEmptyCells::kHide &&
!m_layoutTableCell.firstChild())
return;
- const DisplayItemClient& client =
- m_layoutTableCell.backgroundDisplayItemClient();
- if (DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, client,
- type))
- return;
-
- LayoutRect paintRect =
- paintRectNotIncludingVisualOverflow(adjustedPaintOffset);
- DrawingRecorder recorder(paintInfo.context, client, type,
- FloatRect(paintRect));
+ LayoutRect paintRect = paintRectNotIncludingVisualOverflow(
+ paintOffset + m_layoutTableCell.location());
paintBackground(paintInfo, paintRect, backgroundObject);
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableCellPainter.h ('k') | third_party/WebKit/Source/core/paint/TableCellPainterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698