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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.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/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index b55416e2436510b59648d9601cbd723d6e4a0b17..64dc63414360b823527ac213390bbba7a17c2cfa 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -804,7 +804,7 @@ static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context,
translation.translate(-paintOffset.x(), -paintOffset.y());
TransformRecorder transformRecorder(context, *scrollbar, translation);
- scrollbar->paint(&context, CullRect(transformedClip));
+ scrollbar->paint(context, CullRect(transformedClip));
}
IntRect PaintLayerCompositor::computeInterestRect(const GraphicsLayer* graphicsLayer, const IntRect&) const
@@ -819,7 +819,7 @@ void PaintLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, Gra
else if (graphicsLayer == layerForVerticalScrollbar())
paintScrollbar(m_layoutView.frameView()->verticalScrollbar(), context, interestRect);
else if (graphicsLayer == layerForScrollCorner())
- FramePainter(*m_layoutView.frameView()).paintScrollCorner(&context, interestRect);
+ FramePainter(*m_layoutView.frameView()).paintScrollCorner(context, interestRect);
}
bool PaintLayerCompositor::supportsFixedRootBackgroundCompositing() const
@@ -1044,8 +1044,7 @@ void PaintLayerCompositor::destroyRootLayer()
m_layerForHorizontalScrollbar = nullptr;
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_layoutView.frameView(), HorizontalScrollbar);
- if (Scrollbar* horizontalScrollbar = m_layoutView.frameView()->horizontalScrollbar())
- m_layoutView.frameView()->setScrollbarNeedsPaintInvalidation(horizontalScrollbar);
+ m_layoutView.frameView()->setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
}
if (m_layerForVerticalScrollbar) {
@@ -1053,8 +1052,7 @@ void PaintLayerCompositor::destroyRootLayer()
m_layerForVerticalScrollbar = nullptr;
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_layoutView.frameView(), VerticalScrollbar);
- if (Scrollbar* verticalScrollbar = m_layoutView.frameView()->verticalScrollbar())
- m_layoutView.frameView()->setScrollbarNeedsPaintInvalidation(verticalScrollbar);
+ m_layoutView.frameView()->setScrollbarNeedsPaintInvalidation(VerticalScrollbar);
}
if (m_layerForScrollCorner) {

Powered by Google App Engine
This is Rietveld 408576698