Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
index 3b1b7cc80d33f2edf14595b69711e9ab47901362..c9d8bb787ff2370223ee28363abbeb0beae9371f 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -2679,14 +2679,19 @@ void FrameView::synchronizedPaint() |
if (GraphicsLayer* rootGraphicsLayer = view.compositor()->rootGraphicsLayer()) { |
synchronizedPaintRecursively(rootGraphicsLayer); |
} |
- if (GraphicsLayer* layerForHorizontalScrollbar = view.compositor()->layerForHorizontalScrollbar()) { |
- synchronizedPaintRecursively(layerForHorizontalScrollbar); |
- } |
- if (GraphicsLayer* layerForVerticalScrollbar = view.compositor()->layerForVerticalScrollbar()) { |
- synchronizedPaintRecursively(layerForVerticalScrollbar); |
- } |
- if (GraphicsLayer* layerForScrollCorner = view.compositor()->layerForScrollCorner()) { |
- synchronizedPaintRecursively(layerForScrollCorner); |
+ |
+ // TODO(sataya.m):Main frame doesn't create RootFrameViewport in some |
+ // webkit_unit_tests (http://crbug.com/607987). |
+ if (m_viewportScrollableArea) { |
+ if (GraphicsLayer* layerForHorizontalScrollbar = m_viewportScrollableArea->layerForHorizontalScrollbar()) { |
+ synchronizedPaintRecursively(layerForHorizontalScrollbar); |
+ } |
+ if (GraphicsLayer* layerForVerticalScrollbar = m_viewportScrollableArea->layerForVerticalScrollbar()) { |
+ synchronizedPaintRecursively(layerForVerticalScrollbar); |
+ } |
+ if (GraphicsLayer* layerForScrollCorner = m_viewportScrollableArea->layerForScrollCorner()) { |
+ synchronizedPaintRecursively(layerForScrollCorner); |
+ } |
} |
forAllNonThrottledFrameViews([](FrameView& frameView) { |