| 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 8fb1989aeac1d01e1a82051d1e5c418a1f46c09a..7c6da6a23c50cd7ced6ab8e203098b11e0eedb40 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -417,7 +417,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client,
|
| m_rootLayer(nullptr),
|
| m_rootGraphicsLayer(nullptr),
|
| m_visualViewportContainerLayer(nullptr),
|
| - m_matchesHeuristicsForGpuRasterization(false),
|
| + m_isDesktopSiteOnMobile(false),
|
| m_flingModifier(0),
|
| m_flingSourceDevice(WebGestureDeviceUninitialized),
|
| m_fullscreenController(FullscreenController::create(this)),
|
| @@ -869,8 +869,7 @@ WebInputEventResult WebViewImpl::handleGestureEvent(
|
| WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl();
|
| VisualViewport& visualViewport = page()->frameHost().visualViewport();
|
| bool screencastEnabled = devTools && devTools->screencastEnabled();
|
| - if (event.data.tap.width > 0 &&
|
| - !visualViewport.shouldDisableDesktopWorkarounds() &&
|
| + if (event.data.tap.width > 0 && m_isDesktopSiteOnMobile &&
|
| !screencastEnabled) {
|
| IntRect boundingBox(visualViewport.viewportToRootFrame(
|
| IntRect(event.x - event.data.tap.width / 2,
|
| @@ -2941,7 +2940,7 @@ bool WebViewImpl::scrollFocusedEditableElementIntoRect(
|
|
|
| bool zoomInToLegibleScale =
|
| m_webSettings->autoZoomFocusedNodeToLegibleScale() &&
|
| - !page()->frameHost().visualViewport().shouldDisableDesktopWorkarounds();
|
| + m_isDesktopSiteOnMobile;
|
|
|
| if (zoomInToLegibleScale) {
|
| // When deciding whether to zoom in on a focused text box, we should decide
|
| @@ -3357,20 +3356,21 @@ void WebViewImpl::updatePageDefinedViewportConstraints(
|
| updateMainFrameLayoutSize();
|
|
|
| // If we don't support mobile viewports, allow GPU rasterization.
|
| - m_matchesHeuristicsForGpuRasterization = true;
|
| - if (m_layerTreeView)
|
| + m_isDesktopSiteOnMobile = false;
|
| + if (m_layerTreeView) {
|
| m_layerTreeView->heuristicsForGpuRasterizationUpdated(
|
| - m_matchesHeuristicsForGpuRasterization);
|
| + !m_isDesktopSiteOnMobile);
|
| + }
|
| return;
|
| }
|
|
|
| Document* document = page()->deprecatedLocalMainFrame()->document();
|
|
|
| - m_matchesHeuristicsForGpuRasterization =
|
| - description.matchesHeuristicsForGpuRasterization();
|
| - if (m_layerTreeView)
|
| + m_isDesktopSiteOnMobile = !description.isSpecifiedByAuthor();
|
| + if (m_layerTreeView) {
|
| m_layerTreeView->heuristicsForGpuRasterizationUpdated(
|
| - m_matchesHeuristicsForGpuRasterization);
|
| + !m_isDesktopSiteOnMobile);
|
| + }
|
|
|
| Length defaultMinWidth = document->viewportDefaultMinWidth();
|
| if (defaultMinWidth.isAuto())
|
|
|