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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2361653003: Fix the scale of Drag and Drop shadow image. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/frame/LocalFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 056362260533c491691cc4e6dfb79a8d2f6bd00b..f74e510e3e503caffd2cb14f6bb1752c144fd041 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -48,6 +48,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/Settings.h"
+#include "core/frame/VisualViewport.h"
#include "core/html/HTMLFrameElementBase.h"
#include "core/html/HTMLPlugInElement.h"
#include "core/input/EventHandler.h"
@@ -109,12 +110,13 @@ public:
{
// TODO(oshima): Remove this when all platforms are migrated to use-zoom-for-dsf.
float deviceScaleFactor = m_localFrame->host()->deviceScaleFactorDeprecated();
- m_bounds.setWidth(m_bounds.width() * deviceScaleFactor);
- m_bounds.setHeight(m_bounds.height() * deviceScaleFactor);
+ float pageScaleFactor = m_localFrame->host()->visualViewport().scale();
+ m_bounds.setWidth(m_bounds.width() * deviceScaleFactor * pageScaleFactor);
+ m_bounds.setHeight(m_bounds.height() * deviceScaleFactor * pageScaleFactor);
m_pictureBuilder = wrapUnique(new SkPictureBuilder(SkRect::MakeIWH(m_bounds.width(), m_bounds.height())));
AffineTransform transform;
- transform.scale(deviceScaleFactor, deviceScaleFactor);
+ transform.scale(deviceScaleFactor * pageScaleFactor, deviceScaleFactor * pageScaleFactor);
transform.translate(-m_bounds.x(), -m_bounds.y());
context().getPaintController().createAndAppend<BeginTransformDisplayItem>(*m_pictureBuilder, transform);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698