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

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

Issue 2655463015: Correctly set dragLeave and dragEnd coords for OOPIF drag and drop (Closed)
Patch Set: Cleanup Created 3 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
Index: third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp b/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
index 00a0c73407b793a48fa16517984c57b6afb6bb56..97ab69b0cdd342e2204f5eeb5746cc477639ff06 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
@@ -72,14 +72,17 @@ WebDragOperation WebFrameWidgetBase::dragTargetDragOver(
modifiers);
}
-void WebFrameWidgetBase::dragTargetDragLeave() {
+void WebFrameWidgetBase::dragTargetDragLeave(const WebPoint& pointInViewport,
+ const WebPoint& screenPoint) {
DCHECK(m_currentDragData);
if (ignoreInputEvents()) {
cancelDrag();
return;
}
- DragData dragData(m_currentDragData.get(), IntPoint(), IntPoint(),
+
+ WebPoint pointInRootFrame(viewportToRootFrame(pointInViewport));
+ DragData dragData(m_currentDragData.get(), pointInRootFrame, screenPoint,
static_cast<DragOperation>(m_operationsAllowed));
page()->dragController().dragExited(&dragData, *toCoreFrame(localRoot()));
@@ -109,7 +112,7 @@ void WebFrameWidgetBase::dragTargetDrop(const WebDragData& webDragData,
if (m_dragOperation == WebDragOperationNone) {
// IPC RACE CONDITION: do not allow this drop.
- dragTargetDragLeave();
+ dragTargetDragLeave(pointInViewport, screenPoint);
return;
}

Powered by Google App Engine
This is Rietveld 408576698