Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index d545e9f50f213cd7e0a3be3d5786e3d189963ab1..378674b1496e76bc703a39aa23a3d78bc4ac2d6f 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -3251,12 +3251,6 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription |
| Document* document = page()->deprecatedLocalMainFrame()->document(); |
| - m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(DeviceWidth) |
| - && description.minZoom == 1.0 |
| - && description.minZoomIsExplicit; |
| - if (m_layerTreeView) |
| - m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization); |
| - |
| Length defaultMinWidth = document->viewportDefaultMinWidth(); |
| if (defaultMinWidth.isAuto()) |
| defaultMinWidth = Length(ExtendToZoom); |
| @@ -3283,6 +3277,12 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription |
| setInitialPageScaleOverride(-1); |
| } |
| + m_matchesHeuristicsForGpuRasterization = description.maxWidth == Length(DeviceWidth) |
| + && (m_pageScaleConstraintsSet.pageDefinedConstraints().minimumScale >= 1.0 |
| + || (!description.userZoom && m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale >= 1.0)); |
| + if (m_layerTreeView) |
| + m_layerTreeView->heuristicsForGpuRasterizationUpdated(m_matchesHeuristicsForGpuRasterization); |
| + |
|
ajuma
2014/10/21 17:40:03
I understand the motivation of using the resolved
|
| m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription, defaultMinWidth.intValue(), deviceScaleFactor(), settingsImpl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuirkEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOverviewMode(), settingsImpl()->viewportMetaNonUserScalableQuirk()); |
| float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale; |
| if (oldInitialScale != newInitialScale && newInitialScale != -1) { |