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

Unified Diff: Source/core/rendering/RenderTable.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/RenderTable.cpp
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index aaea9fbb1b930cb199018bc90c847aaaaabd1a21..ff9363f027423f6c3600c0d30f962dcb27b304d5 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -626,14 +626,14 @@ void RenderTable::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
LayoutPoint adjustedPaintOffset = paintOffset + location();
- PaintPhase paintPhase = paintInfo.phase;
+ PaintPhase paintPhase = paintInfo.getPhase();
if (!isRoot()) {
LayoutRect overflowBox = visualOverflowRect();
flipForWritingMode(overflowBox);
- overflowBox.inflate(maximalOutlineSize(paintInfo.phase));
+ overflowBox.inflate(maximalOutlineSize(paintInfo.getPhase()));
overflowBox.moveBy(adjustedPaintOffset);
- if (!overflowBox.intersects(paintInfo.rect))
+ if (!overflowBox.intersects(paintInfo.getRect()))
return;
}
@@ -645,7 +645,7 @@ void RenderTable::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- PaintPhase paintPhase = paintInfo.phase;
+ PaintPhase paintPhase = paintInfo.getPhase();
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasBoxDecorations() && style()->visibility() == VISIBLE)
paintBoxDecorations(paintInfo, paintOffset);
@@ -663,7 +663,7 @@ void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
paintPhase = PaintPhaseChildBlockBackground;
PaintInfo info(paintInfo);
- info.phase = paintPhase;
+ info.setPhase(paintPhase);
info.updatePaintingRootForChildren(this);
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
@@ -677,7 +677,7 @@ void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
recalcCollapsedBorders();
// Using our cached sorted styles, we then do individual passes,
// painting each style of border from lowest precedence to highest precedence.
- info.phase = PaintPhaseCollapsedTableBorders;
+ info.setPhase(PaintPhaseCollapsedTableBorders);
size_t count = m_collapsedBorders.size();
for (size_t i = 0; i < count; ++i) {
m_currentBorder = &m_collapsedBorders[i];
@@ -719,7 +719,7 @@ void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& p
LayoutRect rect(paintOffset, size());
subtractCaptionRect(rect);
- BackgroundBleedAvoidance bleedAvoidance = determineBackgroundBleedAvoidance(paintInfo.context);
+ BackgroundBleedAvoidance bleedAvoidance = determineBackgroundBleedAvoidance(paintInfo.getContext());
if (!boxShadowShouldBeAppliedToBackground(bleedAvoidance))
paintBoxShadow(paintInfo, rect, style(), Normal);
paintBackground(paintInfo, rect, bleedAvoidance);
@@ -731,7 +731,7 @@ void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& p
void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask)
+ if (style()->visibility() != VISIBLE || paintInfo.getPhase() != PaintPhaseMask)
return;
LayoutRect rect(paintOffset, size());

Powered by Google App Engine
This is Rietveld 408576698