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

Unified Diff: third_party/WebKit/Source/core/inspector/DevToolsHost.cpp

Issue 1737733002: [DevTools] Handle emulated device scale factor and original device scale factor properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
index 9854ebcd4eceab5bc6d0963d9c4cf95c16c25015..066f32f543b35e57d8ad740a86268228cac03387 100644
--- a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
+++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
@@ -164,7 +164,10 @@ void DevToolsHost::disconnectClient()
float DevToolsHost::zoomFactor()
{
- return m_frontendFrame ? m_frontendFrame->pageZoomFactor() : 1;
+ float zoomFactor = m_frontendFrame->pageZoomFactor();
+ // Cancel the device scale factor applied to the zoom factor in
+ // use-zoom-for-dsf mode.
+ return convertLengthForEmbedder(1000.f * zoomFactor) / 1000.f;
}
float DevToolsHost::convertLengthForEmbedder(float length)

Powered by Google App Engine
This is Rietveld 408576698