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

Unified Diff: Source/core/rendering/RenderTableCell.cpp

Issue 550363004: Factor painting code out of RenderBox into a new class called BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Created 6 years, 3 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/rendering/RenderTableCell.cpp
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
index a9b9d21fb05d8af6dc6bc44cff961e27934bc78d..a414d04accda2545ff3a8ad2bb1f379b8be576a4 100644
--- a/Source/core/rendering/RenderTableCell.cpp
+++ b/Source/core/rendering/RenderTableCell.cpp
@@ -43,7 +43,7 @@ using namespace HTMLNames;
struct SameSizeAsRenderTableCell : public RenderBlockFlow {
unsigned bitfields;
- int paddings[2];
+ int paddings[4];
};
COMPILE_ASSERT(sizeof(RenderTableCell) == sizeof(SameSizeAsRenderTableCell), RenderTableCell_should_stay_small);
@@ -55,6 +55,7 @@ RenderTableCell::RenderTableCell(Element* element)
, m_cellWidthChanged(false)
, m_intrinsicPaddingBefore(0)
, m_intrinsicPaddingAfter(0)
+ , m_boxPainter(BoxPainter(*this))
{
// We only update the flags when notified of DOM changes in colSpanOrRowSpanChanged()
// so we need to set their initial values here in case something asks for colSpan()/rowSpan() before then.
@@ -1184,7 +1185,7 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay
width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom());
paintInfo.context->clip(clipRect);
}
- paintFillLayers(paintInfo, c, bgLayer, LayoutRect(adjustedPaintOffset, pixelSnappedSize()), BackgroundBleedNone, CompositeSourceOver, backgroundObject);
+ m_boxPainter.paintFillLayers(paintInfo, c, bgLayer, LayoutRect(adjustedPaintOffset, pixelSnappedSize()), BackgroundBleedNone, CompositeSourceOver, backgroundObject);
}
}
@@ -1220,7 +1221,7 @@ void RenderTableCell::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOf
if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
return;
- paintMaskImages(paintInfo, LayoutRect(paintOffset, pixelSnappedSize()));
+ m_boxPainter.paintMaskImages(paintInfo, LayoutRect(paintOffset, pixelSnappedSize()));
}
bool RenderTableCell::boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const

Powered by Google App Engine
This is Rietveld 408576698