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

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

Issue 2499853002: Fixed clip resize for document.rootScroller with inertTopControls (Closed)
Patch Set: Fixed issues + Rebase 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/page/scrolling/TopDocumentRootScrollerController.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
index 5d6d6d3fb280d241804e343a125a07cfdbfc5af3..bb4678bd4c97637523f0ed2c4364401b3b39f0df 100644
--- a/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp
@@ -41,6 +41,26 @@ void TopDocumentRootScrollerController::didChangeRootScroller() {
recomputeGlobalRootScroller();
}
+void TopDocumentRootScrollerController::mainFrameViewResized() {
+ Element* rootScroller = globalRootScroller();
+ if (!rootScroller)
+ return;
+
+ ScrollableArea* area = RootScrollerUtil::scrollableAreaFor(*rootScroller);
+
+ if (!area)
+ return;
+
+ if (PaintLayer* layer = area->layer()) {
+ layer->setNeedsCompositingInputsUpdate();
+
+ // This is needed if the root scroller is an iframe, since the iframe
+ // doesn't have a scrolling/clip layer, its PLC has a container layer that
+ // needs to be resized instead.
+ layer->compositor()->frameViewDidChangeSize();
+ }
+}
+
Element* TopDocumentRootScrollerController::findGlobalRootScrollerElement() {
if (!topDocument())
return nullptr;
@@ -179,6 +199,10 @@ GraphicsLayer* TopDocumentRootScrollerController::rootScrollerLayer() const {
return graphicsLayer;
}
+PaintLayer* TopDocumentRootScrollerController::rootScrollerPaintLayer() const {
+ return RootScrollerUtil::paintLayerFor(m_globalRootScroller);
+}
+
Element* TopDocumentRootScrollerController::globalRootScroller() const {
return m_globalRootScroller.get();
}

Powered by Google App Engine
This is Rietveld 408576698