| 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 7be5f1006676c7800988794aeae343f3fe494fa6..1a856af3d6c079d30b22f3430e6183635af47444 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -3211,14 +3211,6 @@ void WebViewImpl::setPageScaleFactor(float scaleFactor)
|
| page()->frameHost().visualViewport().setScale(scaleFactor);
|
| }
|
|
|
| -float WebViewImpl::deviceScaleFactor() const
|
| -{
|
| - if (!page())
|
| - return 1;
|
| -
|
| - return page()->deviceScaleFactor();
|
| -}
|
| -
|
| void WebViewImpl::setDeviceScaleFactor(float scaleFactor)
|
| {
|
| if (!page())
|
| @@ -4632,4 +4624,14 @@ void WebViewImpl::detachPaintArtifactCompositor()
|
| m_layerTreeView->clearRootLayer();
|
| }
|
|
|
| +float WebViewImpl::deviceScaleFactor() const
|
| +{
|
| + // TODO(oshima): Investigate if this should return the ScreenInfo's scale factor rather than
|
| + // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
|
| + if (!page())
|
| + return 1;
|
| +
|
| + return page()->deviceScaleFactor();
|
| +}
|
| +
|
| } // namespace blink
|
|
|