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

Unified Diff: Source/core/rendering/RenderView.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/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 8bfcbf2d2c5c81ac7e6c7a0899dd8f772cfb52ab..cfd75e909e65c87d8a9778d2ce424565f66aa897 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -408,7 +408,7 @@ void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
// This avoids painting garbage between columns if there is a column gap.
if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated)
- paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundColor());
+ paintInfo.getContext()->fillRect(paintInfo.getRect(), m_frameView->baseBackgroundColor());
paintObject(paintInfo, paintOffset);
}
@@ -492,12 +492,13 @@ void RenderView::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint&)
else {
Color baseColor = frameView()->baseBackgroundColor();
if (baseColor.alpha()) {
- CompositeOperator previousOperator = paintInfo.context->compositeOperation();
- paintInfo.context->setCompositeOperation(CompositeCopy);
- paintInfo.context->fillRect(paintInfo.rect, baseColor);
- paintInfo.context->setCompositeOperation(previousOperator);
- } else
- paintInfo.context->clearRect(paintInfo.rect);
+ CompositeOperator previousOperator = paintInfo.getContext()->compositeOperation();
+ paintInfo.getContext()->setCompositeOperation(CompositeCopy);
+ paintInfo.getContext()->fillRect(paintInfo.getRect(), baseColor);
+ paintInfo.getContext()->setCompositeOperation(previousOperator);
+ } else {
+ paintInfo.getContext()->clearRect(paintInfo.getRect());
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698