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..c5e8a4480aca188f1bc8a157d92879e50f0bb3fc 100644 |
--- a/third_party/WebKit/Source/web/DragClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/DragClientImpl.cpp |
@@ -33,6 +33,7 @@ |
#include "core/clipboard/DataObject.h" |
#include "core/clipboard/DataTransfer.h" |
#include "core/frame/LocalFrame.h" |
+#include "core/page/ChromeClient.h" |
jbroman
2016/01/13 15:35:13
nit: Why this include? You don't seem to have adde
oshima
2016/01/13 18:19:43
m_webView->client() returns ChromeClient
dcheng
2016/01/13 18:20:53
This returns WebViewClient, not ChromeClient.
|
#include "platform/DragImage.h" |
#include "platform/geometry/IntSize.h" |
#include "public/platform/WebCommon.h" |
@@ -69,9 +70,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(); |