| Index: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| index 6dfa436619f353c1f553182fe0ce08030e4a2ecb..0ad1b19f5136105c706ca6c7ba37c934ca1a02ac 100644
|
| --- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| @@ -88,6 +88,16 @@ void RootScrollerController::didUpdateLayout()
|
| recomputeEffectiveRootScroller();
|
| }
|
|
|
| +void RootScrollerController::didDisposePaintLayerScrollableArea(
|
| + PaintLayerScrollableArea& area)
|
| +{
|
| + if (!m_effectiveRootScroller)
|
| + return;
|
| +
|
| + if (&area.box() == m_effectiveRootScroller->layoutObject())
|
| + recomputeEffectiveRootScroller();
|
| +}
|
| +
|
| void RootScrollerController::recomputeEffectiveRootScroller()
|
| {
|
| bool rootScrollerValid =
|
| @@ -150,8 +160,11 @@ PaintLayer* RootScrollerController::rootScrollerPaintLayer() const
|
| // PaintLayer (i.e. the PaintLayerCompositor's root layer). The reason the root
|
| // scroller is the <html> layer and not #document is because the latter is a Node
|
| // but not an Element.
|
| - if (m_effectiveRootScroller->isSameNode(m_document->documentElement()))
|
| + if (m_effectiveRootScroller->isSameNode(m_document->documentElement())) {
|
| + if (!layer || !layer->compositor())
|
| + return nullptr;
|
| return layer->compositor()->rootLayer();
|
| + }
|
|
|
| return layer;
|
| }
|
|
|