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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2499853002: Fixed clip resize for document.rootScroller with inertTopControls (Closed)
Patch Set: Fixed typo Created 4 years, 1 month 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 f1e4f3954e713c0dfb2ce8037fdce48615c569a3..eaf50612712b8f8de2f60313519745cbed9427f4 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -633,16 +633,32 @@ void PaintLayerCompositor::frameViewDidChangeLocation(
m_overflowControlsHostLayer->setPosition(contentsOffset);
}
+void PaintLayerCompositor::updateContainerSizes() {
+ if (!m_containerLayer)
+ return;
+
+ FrameView* frameView = m_layoutView.frameView();
+
+ const TopDocumentRootScrollerController& globalRootScrollerController =
+ m_layoutView.document().frameHost()->globalRootScrollerController();
+
+ // The global root scroller must always size to the root FrameView.
+ if (rootLayer() &&
+ rootLayer() == globalRootScrollerController.rootScrollerPaintLayer())
+ frameView = m_layoutView.document().topDocument().view();
+
+ m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
+ m_overflowControlsHostLayer->setSize(
+ FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
+}
+
void PaintLayerCompositor::frameViewDidChangeSize() {
- if (m_containerLayer) {
- FrameView* frameView = m_layoutView.frameView();
- m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
- m_overflowControlsHostLayer->setSize(
- FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
+ if (!m_containerLayer)
+ return;
- frameViewDidScroll();
- updateOverflowControlsLayers();
- }
+ updateContainerSizes();
+ frameViewDidScroll();
+ updateOverflowControlsLayers();
}
enum AcceleratedFixedRootBackgroundHistogramBuckets {
@@ -842,12 +858,8 @@ void PaintLayerCompositor::updateRootLayerPosition() {
m_rootContentLayer->setSize(FloatSize(documentRect.size()));
m_rootContentLayer->setPosition(documentRect.location());
}
- if (m_containerLayer) {
- FrameView* frameView = m_layoutView.frameView();
- m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
- m_overflowControlsHostLayer->setSize(
- FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
- }
+ if (m_containerLayer)
+ updateContainerSizes();
}
void PaintLayerCompositor::updatePotentialCompositingReasonsFromStyle(

Powered by Google App Engine
This is Rietveld 408576698