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

Unified Diff: third_party/WebKit/Source/web/DragClientImpl.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 | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/DragClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/DragClientImpl.cpp b/third_party/WebKit/Source/web/DragClientImpl.cpp
index 838fc0d9606e64b9cae58462177ecabd34fa1b16..052a6333ae84b046747098798bf474f6399ddce0 100644
--- a/third_party/WebKit/Source/web/DragClientImpl.cpp
+++ b/third_party/WebKit/Source/web/DragClientImpl.cpp
@@ -69,9 +69,11 @@ void DragClientImpl::startDrag(DragImage* dragImage, const IntPoint& dragImageOr
if (dragImage) {
float resolutionScale = dragImage->resolutionScale();
- if (m_webView->deviceScaleFactor() != resolutionScale) {
+ float deviceScaleFactor =
+ m_webView->client()->screenInfo().deviceScaleFactor;
+ if (deviceScaleFactor != resolutionScale) {
ASSERT(resolutionScale > 0);
- float scale = m_webView->deviceScaleFactor() / resolutionScale;
+ float scale = deviceScaleFactor / resolutionScale;
dragImage->scale(scale, scale);
}
image = dragImage->bitmap();
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698