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

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

Issue 2396693002: Convert drag event position to root frame. (Closed)
Patch Set: Convert drag event position to root frame. Created 4 years, 2 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/WebInputEventConversion.cpp ('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/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index f3691ab0d9df068f3dad7bc7368733ce2a5d264c..bfe73298fc9b225ee9d9ee7b3180dc9b56cd43e4 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -3709,6 +3709,8 @@ void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint&
const WebPoint& screenPoint,
int modifiers)
{
+ WebPoint clientPointInRootFrame(convertDragEventPointToRootFrame(mainFrameImpl()->frameView(), IntPoint(clientPoint.x, clientPoint.y)));
bokan 2016/10/04 23:47:23 no need for the helper function, just call page()-
hush (inactive) 2016/10/05 00:24:33 Done.
+
DCHECK(m_currentDragData);
m_currentDragData = DataObject::create(webDragData);
@@ -3730,7 +3732,7 @@ void WebViewImpl::dragTargetDrop(const WebDragData& webDragData, const WebPoint&
m_currentDragData->setModifiers(modifiers);
DragData dragData(
m_currentDragData.get(),
- clientPoint,
+ clientPointInRootFrame,
screenPoint,
static_cast<DragOperation>(m_operationsAllowed));
@@ -3769,10 +3771,12 @@ WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo
{
DCHECK(m_currentDragData);
+ WebPoint clientPointInRootFrame(convertDragEventPointToRootFrame(mainFrameImpl()->frameView(), IntPoint(clientPoint.x, clientPoint.y)));
+
m_currentDragData->setModifiers(modifiers);
DragData dragData(
m_currentDragData.get(),
- clientPoint,
+ clientPointInRootFrame,
screenPoint,
static_cast<DragOperation>(m_operationsAllowed));
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698