| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 6e4f66214a0ab35397835f667f938b626b76f329..c95ff4cfa344853cc5ae7c593179ea79f0fd582b 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -3310,9 +3310,15 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
|
| m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization);
|
| }
|
|
|
| - if (!settings()->viewportEnabled() || !page() || (!m_size.width && !m_size.height) || !page()->mainFrame()->isLocalFrame())
|
| + if (!page() || (!m_size.width && !m_size.height) || !page()->mainFrame()->isLocalFrame())
|
| return;
|
|
|
| + if (!settings()->viewportEnabled()) {
|
| + pageScaleConstraintsSet().clearPageDefinedConstraints();
|
| + updateMainFrameLayoutSize();
|
| + return;
|
| + }
|
| +
|
| Document* document = page()->deprecatedLocalMainFrame()->document();
|
|
|
| m_matchesHeuristicsForGpuRasterization = description.matchesHeuristicsForGpuRasterization();
|
| @@ -3413,18 +3419,6 @@ WebSize WebViewImpl::contentsPreferredMinimumSize()
|
| return IntSize(widthScaled, heightScaled);
|
| }
|
|
|
| -void WebViewImpl::enableViewport()
|
| -{
|
| - settings()->setViewportEnabled(true);
|
| -}
|
| -
|
| -void WebViewImpl::disableViewport()
|
| -{
|
| - settings()->setViewportEnabled(false);
|
| - pageScaleConstraintsSet().clearPageDefinedConstraints();
|
| - updateMainFrameLayoutSize();
|
| -}
|
| -
|
| float WebViewImpl::defaultMinimumPageScaleFactor() const
|
| {
|
| return pageScaleConstraintsSet().defaultConstraints().minimumScale;
|
|
|