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

Unified Diff: third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years 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: third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp b/third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp
index c1ef8c912f9d9b3d0cacdbd934a73dab6ae021a2..a5ca9c9e05710fc7ec7595b67bece499cecc7345 100644
--- a/third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ScrollbarPainter.cpp
@@ -13,7 +13,7 @@
namespace blink {
-void ScrollbarPainter::paintPart(GraphicsContext* graphicsContext, ScrollbarPart partType, const IntRect& rect)
+void ScrollbarPainter::paintPart(GraphicsContext& graphicsContext, ScrollbarPart partType, const IntRect& rect)
{
const LayoutScrollbarPart* partLayoutObject = m_layoutScrollbar->getPart(partType);
if (!partLayoutObject)
@@ -21,7 +21,7 @@ void ScrollbarPainter::paintPart(GraphicsContext* graphicsContext, ScrollbarPart
paintIntoRect(*partLayoutObject, graphicsContext, m_layoutScrollbar->location(), LayoutRect(rect));
}
-void ScrollbarPainter::paintIntoRect(const LayoutScrollbarPart& layoutScrollbarPart, GraphicsContext* graphicsContext, const LayoutPoint& paintOffset, const LayoutRect& rect)
+void ScrollbarPainter::paintIntoRect(const LayoutScrollbarPart& layoutScrollbarPart, GraphicsContext& graphicsContext, const LayoutPoint& paintOffset, const LayoutRect& rect)
{
// Make sure our dimensions match the rect.
// FIXME: Setting these is a bad layering violation!
@@ -30,7 +30,7 @@ void ScrollbarPainter::paintIntoRect(const LayoutScrollbarPart& layoutScrollbarP
const_cast<LayoutScrollbarPart&>(layoutScrollbarPart).setHeight(rect.height());
// Now do the paint.
- PaintInfo paintInfo(graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBlockBackground, GlobalPaintNormalPhase, PaintLayerNoFlag);
+ PaintInfo paintInfo(&graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBlockBackground, GlobalPaintNormalPhase, PaintLayerNoFlag);
BlockPainter blockPainter(layoutScrollbarPart);
blockPainter.paint(paintInfo, paintOffset);
paintInfo.phase = PaintPhaseChildBlockBackgrounds;
« no previous file with comments | « third_party/WebKit/Source/core/paint/ScrollbarPainter.h ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698