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

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

Issue 576823004: Move painting code for tables into *Paint classes. (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
« no previous file with comments | « Source/core/rendering/RenderTableRow.h ('k') | Source/core/rendering/RenderTableSection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableRow.cpp
diff --git a/Source/core/rendering/RenderTableRow.cpp b/Source/core/rendering/RenderTableRow.cpp
index ac1e5f7e204d6de6ea4b0a06b8186143203aaab9..e171c63a837e33f53c28459676159000d02b9040 100644
--- a/Source/core/rendering/RenderTableRow.cpp
+++ b/Source/core/rendering/RenderTableRow.cpp
@@ -27,6 +27,7 @@
#include "core/HTMLNames.h"
#include "core/fetch/ImageResource.h"
+#include "core/paint/TableRowPainter.h"
#include "core/rendering/GraphicsContextAnnotator.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/PaintInfo.h"
@@ -219,27 +220,9 @@ bool RenderTableRow::nodeAtPoint(const HitTestRequest& request, HitTestResult& r
return false;
}
-void RenderTableRow::paintOutlineForRowIfNeeded(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-{
- LayoutPoint adjustedPaintOffset = paintOffset + location();
- PaintPhase paintPhase = paintInfo.phase;
- if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style()->visibility() == VISIBLE)
- paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size()));
-}
-
void RenderTableRow::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- ASSERT(hasSelfPaintingLayer());
- ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
-
- paintOutlineForRowIfNeeded(paintInfo, paintOffset);
- for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
- // Paint the row background behind the cell.
- if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground)
- cell->paintBackgroundsBehindCell(paintInfo, paintOffset, this);
- if (!cell->hasSelfPaintingLayer())
- cell->paint(paintInfo, paintOffset);
- }
+ TableRowPainter(*this).paint(paintInfo, paintOffset);
}
void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*)
« no previous file with comments | « Source/core/rendering/RenderTableRow.h ('k') | Source/core/rendering/RenderTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698