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 41c82e1bade17003c23855bb8d1163c79ea0b2e7..216b78f2a864c8875e49195dd53f7aa3c8213749 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()); |
@@ -1522,6 +1515,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 |
@@ -3535,6 +3542,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. |