Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1572703002: Use the screen info's scale factor to scale the drag image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698