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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 1e1bf54b71d6690470c8e3bd803e423ea33ab088..ccffb685b583382307ae807d7c41548c5b8626e1 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -522,13 +522,6 @@ void FrameView::setFrameRect(const IntRect& newRect) {
updateParentScrollableAreaSet();
- if (LayoutViewItem layoutView = this->layoutViewItem()) {
- // TODO(majidvp): It seems that this only needs to be called when size
- // is updated ignoring any change in the location.
- if (layoutView.usesCompositing())
- layoutView.compositor()->frameViewDidChangeSize();
- }
-
if (frameSizeChanged) {
viewportSizeChanged(newRect.width() != oldRect.width(),
newRect.height() != oldRect.height());
@@ -1530,6 +1523,20 @@ void FrameView::removeViewportConstrainedObject(LayoutObject* object) {
void FrameView::viewportSizeChanged(bool widthChanged, bool heightChanged) {
DCHECK(widthChanged || heightChanged);
+ if (LayoutViewItem layoutView = this->layoutViewItem()) {
+ if (layoutView.usesCompositing())
+ layoutView.compositor()->frameViewDidChangeSize();
+ }
+
+ // Ensure the root scroller compositing layers update geometry in response to
+ // the URL bar resizing.
+ if (m_frame->isMainFrame()) {
+ m_frame->document()
+ ->frameHost()
+ ->globalRootScrollerController()
+ .mainFrameViewResized();
+ }
+
showOverlayScrollbars();
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// The background must be repainted when the FrameView is resized, even if
@@ -3542,7 +3549,7 @@ bool FrameView::visualViewportSuppliesScrollbars() {
if (!controller.globalRootScroller())
return false;
- return RootScrollerUtil::scrollableAreaFor(
+ return RootScrollerUtil::scrollableAreaForRootScroller(
*controller.globalRootScroller()) ==
layoutViewportScrollableArea();
}
@@ -3587,6 +3594,14 @@ void FrameView::setBrowserControlsViewportAdjustment(float adjustment) {
m_browserControlsViewportAdjustment = adjustment;
}
+PaintLayer* FrameView::layer() const {
+ LayoutViewItem layoutView = layoutViewItem();
+ if (layoutView.isNull() || !layoutView.compositor())
+ return nullptr;
+
+ return layoutView.compositor()->rootLayer();
+}
+
IntSize FrameView::maximumScrollOffsetInt() const {
// Make the same calculation as in CC's LayerImpl::MaxScrollOffset()
// FIXME: We probably shouldn't be storing the bounds in a float.

Powered by Google App Engine
This is Rietveld 408576698