| 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 3c7a5ca233b60d503615bf953f2fe86955b68b4a..49086a4f76c657ca17b40f2a1b4a5dc7e483132c 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -517,13 +517,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());
|
| @@ -1511,6 +1504,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
|
| @@ -3523,6 +3530,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.
|
|
|