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

Unified Diff: Source/core/rendering/svg/RenderSVGForeignObject.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: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. 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/svg/RenderSVGForeignObject.cpp
diff --git a/Source/core/rendering/svg/RenderSVGForeignObject.cpp b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
index 2153235703547068b2fc7657c610377d3e5344fa..684be00bff76dfa77dd8354d61b3e0ccb1eafbda 100644
--- a/Source/core/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
@@ -46,20 +46,20 @@ RenderSVGForeignObject::~RenderSVGForeignObject()
void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
- if (paintInfo.context->paintingDisabled()
- || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
+ if (paintInfo.getContext()->paintingDisabled()
+ || (paintInfo.getPhase() != PaintPhaseForeground && paintInfo.getPhase() != PaintPhaseSelection))
return;
PaintInfo childPaintInfo(paintInfo);
- GraphicsContextStateSaver stateSaver(*childPaintInfo.context);
+ GraphicsContextStateSaver stateSaver(*(childPaintInfo.getContext()));
childPaintInfo.applyTransform(localTransform());
if (SVGRenderSupport::isOverflowHidden(this))
- childPaintInfo.context->clip(m_viewport);
+ childPaintInfo.getContext()->clip(m_viewport);
SVGRenderingContext renderingContext;
bool continueRendering = true;
- if (paintInfo.phase == PaintPhaseForeground) {
+ if (paintInfo.getPhase() == PaintPhaseForeground) {
renderingContext.prepareToRenderSVGContent(this, childPaintInfo);
continueRendering = renderingContext.isRenderingPrepared();
}
@@ -67,18 +67,19 @@ void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&)
if (continueRendering) {
// Paint all phases of FO elements atomically, as though the FO element established its
// own stacking context.
- bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip;
+ bool preservePhase = paintInfo.getPhase() == PaintPhaseSelection || paintInfo.getPhase() == PaintPhaseTextClip;
LayoutPoint childPoint = IntPoint();
- childPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
+ PaintPhase phase = preservePhase ? paintInfo.getPhase() : PaintPhaseBlockBackground;
+ childPaintInfo.setPhase(phase);
RenderBlock::paint(childPaintInfo, IntPoint());
if (!preservePhase) {
- childPaintInfo.phase = PaintPhaseChildBlockBackgrounds;
+ childPaintInfo.setPhase(PaintPhaseChildBlockBackgrounds);
RenderBlock::paint(childPaintInfo, childPoint);
- childPaintInfo.phase = PaintPhaseFloat;
+ childPaintInfo.setPhase(PaintPhaseFloat);
RenderBlock::paint(childPaintInfo, childPoint);
- childPaintInfo.phase = PaintPhaseForeground;
+ childPaintInfo.setPhase(PaintPhaseForeground);
RenderBlock::paint(childPaintInfo, childPoint);
- childPaintInfo.phase = PaintPhaseOutline;
+ childPaintInfo.setPhase(PaintPhaseOutline);
RenderBlock::paint(childPaintInfo, childPoint);
}
}

Powered by Google App Engine
This is Rietveld 408576698