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

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

Issue 2127053002: Revert of Fix inspector overlay when use-zoom-for-dsf is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/InspectorOverlay.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index 25e495b556c99084ad8478acac78eb3b183dd04b..795309b67d7bca53c075e5d11263dec0e9659ddf 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -389,7 +389,8 @@
LocalFrame* frame = toLocalFrame(overlayPage()->mainFrame());
frame->view()->resize(viewportSize);
overlayPage()->frameHost().visualViewport().setSize(viewportSize);
- frame->setPageZoomFactor(windowToViewportScale());
+ float windowToViewportScale = m_webViewImpl->chromeClient().windowToViewportScalar(1.0f);
+ frame->setPageZoomFactor(windowToViewportScale);
reset(viewportSize, visibleRectInDocument.location());
@@ -445,7 +446,7 @@
if (!m_highlightQuad)
return;
- InspectorHighlight highlight(windowToViewportScale());
+ InspectorHighlight highlight;
highlight.appendQuad(*m_highlightQuad, m_quadHighlightConfig.content, m_quadHighlightConfig.contentOutline);
evaluateInOverlay("drawHighlight", highlight.asProtocolValue());
}
@@ -460,11 +461,6 @@
{
if (m_resizeTimerActive && m_drawViewSize)
evaluateInOverlay("drawViewSize", "");
-}
-
-float InspectorOverlay::windowToViewportScale() const
-{
- return m_webViewImpl->chromeClient().windowToViewportScalar(1.0f);
}
Page* InspectorOverlay::overlayPage()
@@ -548,7 +544,8 @@
// The zoom factor in the overlay frame already has been multiplied by the window to viewport scale
// (aka device scale factor), so cancel it.
- resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame()->pageZoomFactor() / windowToViewportScale());
+ float windowToViewportScale = m_webViewImpl->chromeClient().windowToViewportScalar(1.0f);
+ resetData->setNumber("pageZoomFactor", m_webViewImpl->mainFrameImpl()->frame()->pageZoomFactor() / windowToViewportScale);
resetData->setNumber("scrollX", documentScrollOffset.x());
resetData->setNumber("scrollY", documentScrollOffset.y());
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698