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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp

Issue 2365173002: Detach PaintLayerScrollableArea from RootFrameViewport when disposed. (Closed)
Patch Set: None Created 4 years, 3 months 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698