Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 79018e8aefcd6e3117dbd534e39b1501b650e52b..38a0553d0af224ed7fd473dcc023b28adf606ec6 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -1716,22 +1716,11 @@ |
if (!view) |
return; |
- float topControlsViewportAdjustment = m_topControlsLayoutHeight - m_topControlsContentOffset; |
- if (!pinchVirtualViewportEnabled()) { |
- // The viewport bounds were adjusted on the compositor by this much due to top controls. Tell |
- // the FrameView about it so it can make correct scroll offset clamping decisions during compositor |
- // commits. |
- view->setTopControlsViewportAdjustment(topControlsViewportAdjustment); |
- } else { |
- PinchViewport& pinchViewport = page()->frameHost().pinchViewport(); |
- pinchViewport.setTopControlsAdjustment(topControlsViewportAdjustment); |
- |
- // Shrink the FrameView by the amount that will maintain the aspect-ratio with the PinchViewport. |
- float aspectRatio = pinchViewport.visibleRect().width() / pinchViewport.visibleRect().height(); |
- float newHeight = view->unscaledVisibleContentSize(ExcludeScrollbars).width() / aspectRatio; |
- float adjustment = newHeight - view->unscaledVisibleContentSize(ExcludeScrollbars).height(); |
- view->setTopControlsViewportAdjustment(adjustment); |
- } |
+ // The viewport bounds were adjusted on the compositor by this much due to top controls. Tell |
+ // the FrameView about it so it can make correct scroll offset clamping decisions during compositor |
+ // commits. |
+ float topControlsViewportAdjustment = m_topControlsContentOffset - m_topControlsLayoutHeight; |
+ view->setTopControlsViewportAdjustment(topControlsViewportAdjustment); |
} |
void WebViewImpl::resize(const WebSize& newSize) |