| Index: third_party/WebKit/Source/core/paint/TableRowPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/TableRowPainter.cpp b/third_party/WebKit/Source/core/paint/TableRowPainter.cpp
|
| index e0cdc9269dcca5ff5c4188302bc79d1b68904fd0..635fdfee9ec6a68e7056a4e3102740fb5eae6264 100644
|
| --- a/third_party/WebKit/Source/core/paint/TableRowPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/TableRowPainter.cpp
|
| @@ -6,6 +6,8 @@
|
|
|
| #include "core/layout/LayoutTableCell.h"
|
| #include "core/layout/LayoutTableRow.h"
|
| +#include "core/paint/BoxPainter.h"
|
| +#include "core/paint/LayoutObjectDrawingRecorder.h"
|
| #include "core/paint/ObjectPainter.h"
|
| #include "core/paint/PaintInfo.h"
|
| #include "core/paint/TableCellPainter.h"
|
| @@ -23,10 +25,14 @@ void TableRowPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint
|
| return;
|
|
|
| PaintInfo paintInfoForCells = paintInfo.forDescendants();
|
| - if (shouldPaintSelfBlockBackground(paintInfo.phase) && m_layoutTableRow.hasBackground()) {
|
| - // Paint row background of behind the cells.
|
| - for (LayoutTableCell* cell = m_layoutTableRow.firstCell(); cell; cell = cell->nextCell())
|
| - TableCellPainter(*cell).paintContainerBackgroundBehindCell(paintInfoForCells, paintOffset, m_layoutTableRow, DisplayItem::TableCellBackgroundFromRow);
|
| + if (shouldPaintSelfBlockBackground(paintInfo.phase)) {
|
| + paintBoxShadow(paintInfo, paintOffset, Normal);
|
| + if (m_layoutTableRow.hasBackground()) {
|
| + // Paint row background of behind the cells.
|
| + for (LayoutTableCell* cell = m_layoutTableRow.firstCell(); cell; cell = cell->nextCell())
|
| + TableCellPainter(*cell).paintContainerBackgroundBehindCell(paintInfoForCells, paintOffset, m_layoutTableRow, DisplayItem::TableCellBackgroundFromRow);
|
| + }
|
| + paintBoxShadow(paintInfo, paintOffset, Inset);
|
| }
|
|
|
| if (paintInfo.phase == PaintPhaseSelfBlockBackgroundOnly)
|
| @@ -45,6 +51,22 @@ void TableRowPainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint
|
| ObjectPainter(m_layoutTableRow).paintOutline(paintInfo, adjustedPaintOffset);
|
| }
|
|
|
| +void TableRowPainter::paintBoxShadow(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, ShadowStyle shadowStyle)
|
| +{
|
| + DCHECK(shouldPaintSelfBlockBackground(paintInfo.phase));
|
| + if (!m_layoutTableRow.styleRef().boxShadow())
|
| + return;
|
| +
|
| + DisplayItem::Type type = shadowStyle == Normal ? DisplayItem::TableRowBoxShadowNormal : DisplayItem::TableRowBoxShadowInset;
|
| + if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutTableRow, type))
|
| + return;
|
| +
|
| + LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableRow.location();
|
| + LayoutRect bounds = BoxPainter(m_layoutTableRow).boundsForDrawingRecorder(adjustedPaintOffset);
|
| + LayoutObjectDrawingRecorder recorder(paintInfo.context, m_layoutTableRow, type, bounds);
|
| + BoxPainter::paintBoxShadow(paintInfo, LayoutRect(adjustedPaintOffset, m_layoutTableRow.size()), m_layoutTableRow.styleRef(), shadowStyle);
|
| +}
|
| +
|
| void TableRowPainter::paintBackgroundBehindCell(const LayoutTableCell& cell, const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| {
|
| DCHECK(m_layoutTableRow.hasBackground() && !m_layoutTableRow.hasSelfPaintingLayer());
|
|
|