Chromium Code Reviews| 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 fe889d4f9fb92f8fe078d49f546d9d80a5e741bc..be19f6e366d3b3151c69131c3b1c023cb8457f53 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -412,6 +412,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) |
| , m_zoomLevel(0) |
| , m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier)) |
| , m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier)) |
| + , m_zoomFactorForDeviceScaleFactor(1.f) |
| , m_maximumLegibleScale(1) |
| , m_doubleTapZoomPageScaleFactor(0) |
| , m_doubleTapZoomPending(false) |
| @@ -2958,6 +2959,7 @@ double WebViewImpl::setZoomLevel(double zoomLevel) |
| LocalFrame* frame = mainFrameImpl()->frame(); |
| if (!WebLocalFrameImpl::pluginContainerFromFrame(frame)) { |
| float zoomFactor = m_zoomFactorOverride ? m_zoomFactorOverride : static_cast<float>(zoomLevelToZoomFactor(m_zoomLevel)); |
| + zoomFactor *= m_zoomFactorForDeviceScaleFactor; |
| frame->setPageZoomFactor(zoomFactor); |
| } |
| @@ -3103,6 +3105,14 @@ void WebViewImpl::setDeviceScaleFactor(float scaleFactor) |
| updateLayerTreeDeviceScaleFactor(); |
| } |
| +void WebViewImpl::setZoomFactorForDeviceScaleFactor(float zoomFactorForDeviceScaleFactor) |
| +{ |
| + if (!m_layerTreeView || m_zoomFactorForDeviceScaleFactor == zoomFactorForDeviceScaleFactor) |
| + return; |
| + m_zoomFactorForDeviceScaleFactor = zoomFactorForDeviceScaleFactor; |
|
piman
2015/10/30 21:32:02
ISTM you want to save the zoomFactorForDSF regardl
oshima
2015/10/30 23:23:12
Done.
I also remove the equality check so that it
|
| + setZoomLevel(m_zoomLevel); |
| +} |
| + |
| void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) |
| { |
| if (!page()) |