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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.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/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index c72cb6d3f03e5bbf1155f7aa2bf4595a8529e040..89d8e71bd8340a17bfa689487bd27bbd0d06d196 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -52,6 +52,7 @@
#include "core/page/Page.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/page/scrolling/StickyPositionScrollingConstraints.h"
+#include "core/page/scrolling/TopDocumentRootScrollerController.h"
#include "core/paint/ObjectPaintInvalidator.h"
#include "core/paint/PaintInfo.h"
#include "core/paint/PaintLayerPainter.h"
@@ -1259,6 +1260,17 @@ void CompositedLayerMapping::updateScrollingLayerGeometry(
LayoutBox* layoutBox = toLayoutBox(layoutObject());
IntRect overflowClipRect =
pixelSnappedIntRect(layoutBox->overflowClipRect(LayoutPoint()));
+
+ const TopDocumentRootScrollerController& globalRootScrollerController =
+ layoutBox->document().frameHost()->globalRootScrollerController();
+
+ if (&m_owningLayer == globalRootScrollerController.rootScrollerPaintLayer()) {
+ LayoutRect clipRect =
+ layoutBox->document().layoutView()->overflowClipRect(LayoutPoint());
+ DCHECK(clipRect.size() == LayoutSize(pixelSnappedIntRect(clipRect).size()));
+ overflowClipRect.setSize(pixelSnappedIntRect(clipRect).size());
+ }
+
FloatPoint scrollPosition =
m_owningLayer.getScrollableArea()->scrollPosition();
m_scrollingLayer->setPosition(FloatPoint(

Powered by Google App Engine
This is Rietveld 408576698