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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 5 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/RenderTableSection.cpp
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index 765b35e238ac819d6edba8188fcf0df6bf4c88cc..bc5ef32ac479eb8bbc40a79eaa534c699f24b6a8 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -1140,7 +1140,7 @@ void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff
LayoutPoint adjustedPaintOffset = paintOffset + location();
- PaintPhase phase = paintInfo.phase;
+ PaintPhase phase = paintInfo.getPhase();
bool pushedClip = pushContentsClip(paintInfo, adjustedPaintOffset);
paintObject(paintInfo, adjustedPaintOffset);
if (pushedClip)
@@ -1168,7 +1168,7 @@ static inline bool compareCellPositionsWithOverflowingCells(RenderTableCell* ele
void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
LayoutPoint cellPoint = flipForWritingModeForChild(cell, paintOffset);
- PaintPhase paintPhase = paintInfo.phase;
+ PaintPhase paintPhase = paintInfo.getPhase();
RenderTableRow* row = toRenderTableRow(cell->parent());
if (paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) {
@@ -1304,9 +1304,9 @@ CellSpan RenderTableSection::spannedColumns(const LayoutRect& flippedRect) const
void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- PaintPhase paintPhase = paintInfo.phase;
+ PaintPhase paintPhase = paintInfo.getPhase();
- LayoutRect localRepaintRect = paintInfo.rect;
+ LayoutRect localRepaintRect = paintInfo.getRect();
localRepaintRect.moveBy(-paintOffset);
localRepaintRect.inflate(maximalOutlineSize(paintPhase));
@@ -1317,7 +1317,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& pa
if (dirtiedColumns.start() < dirtiedColumns.end()) {
if (!m_hasMultipleCellLevels && !m_overflowingCells.size()) {
- if (paintInfo.phase == PaintPhaseCollapsedTableBorders) {
+ if (paintInfo.getPhase() == PaintPhaseCollapsedTableBorders) {
// Collapsed borders are painted from the bottom right to the top left so that precedence
// due to cell position is respected.
for (unsigned r = dirtiedRows.end(); r > dirtiedRows.start(); r--) {
@@ -1389,7 +1389,7 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& pa
else
std::sort(cells.begin(), cells.end(), compareCellPositionsWithOverflowingCells);
- if (paintInfo.phase == PaintPhaseCollapsedTableBorders) {
+ if (paintInfo.getPhase() == PaintPhaseCollapsedTableBorders) {
for (unsigned i = cells.size(); i > 0; --i) {
LayoutPoint cellPoint = flipForWritingModeForChild(cells[i - 1], paintOffset);
cells[i - 1]->paintCollapsedBorders(paintInfo, cellPoint);

Powered by Google App Engine
This is Rietveld 408576698