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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.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/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index a50429bbe18747041aad2e05267eb62cff986fb2..64ee6a63899d6412e41b9b5584ab37e14c270921 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -114,7 +114,7 @@ void WebPluginContainerImpl::layoutIfNeeded()
m_webPlugin->layoutIfNeeded();
}
-void WebPluginContainerImpl::paint(GraphicsContext* context, const CullRect& cullRect) const
+void WebPluginContainerImpl::paint(GraphicsContext& context, const CullRect& cullRect) const
{
if (!parent())
return;
@@ -123,11 +123,11 @@ void WebPluginContainerImpl::paint(GraphicsContext* context, const CullRect& cul
if (!cullRect.intersectsCullRect(frameRect()))
return;
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, LayoutPoint()))
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, LayoutPoint()))
return;
- LayoutObjectDrawingRecorder drawingRecorder(*context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, cullRect.m_rect, LayoutPoint());
- context->save();
+ LayoutObjectDrawingRecorder drawingRecorder(context, *m_element->layoutObject(), DisplayItem::Type::WebPlugin, cullRect.m_rect, LayoutPoint());
+ context.save();
ASSERT(parent()->isFrameView());
FrameView* view = toFrameView(parent());
@@ -135,14 +135,14 @@ void WebPluginContainerImpl::paint(GraphicsContext* context, const CullRect& cul
// The plugin is positioned in the root frame's coordinates, so it needs to
// be painted in them too.
IntPoint origin = view->contentsToRootFrame(IntPoint(0, 0));
- context->translate(static_cast<float>(-origin.x()), static_cast<float>(-origin.y()));
+ context.translate(static_cast<float>(-origin.x()), static_cast<float>(-origin.y()));
- WebCanvas* canvas = context->canvas();
+ WebCanvas* canvas = context.canvas();
IntRect windowRect = view->contentsToRootFrame(cullRect.m_rect);
m_webPlugin->paint(canvas, windowRect);
- context->restore();
+ context.restore();
}
void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | third_party/WebKit/Source/web/mac/WebScrollbarTheme.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698